protobuf-platform 1.2.757 → 1.2.759

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.757",
3
+ "version": "1.2.759",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3,6 +3,8 @@ syntax = "proto3";
3
3
  package payment;
4
4
 
5
5
  service Payment {
6
+ // One bounded batch (1..200 actions), no N+1 transport.
7
+ rpc getWarehouseCasinoEvidenceBatch(WarehouseCasinoEvidenceBatchRequest) returns (WarehouseCasinoEvidenceBatchResponse);
6
8
  // Bounded read-only exact evidence; no financial commands or raw payloads.
7
9
  rpc getWarehouseCasinoEvidence(WarehouseCasinoEvidenceRequest) returns (WarehouseCasinoEvidenceResponse);
8
10
  // Bootstrap control only; no financial effect or per-event readiness calls.
@@ -2042,3 +2044,16 @@ message WarehouseCasinoEvidenceEntry {
2042
2044
  string delta_numerator = 11;
2043
2045
  string delta_denominator = 12;
2044
2046
  }
2047
+
2048
+ message WarehouseCasinoEvidenceBatchRequest {
2049
+ string customer = 1;
2050
+ string environment = 2;
2051
+ repeated WarehouseCasinoEvidenceRequest actions = 3;
2052
+ }
2053
+ message WarehouseCasinoEvidenceBatchResponse {
2054
+ string customer = 1;
2055
+ string environment = 2;
2056
+ repeated WarehouseCasinoEvidenceResponse actions = 3;
2057
+ uint32 sql_queries = 4;
2058
+ uint32 elapsed_ms = 5;
2059
+ }
@@ -1467,6 +1467,28 @@ function deserialize_payment_UserWithdrawalItemsResponse(buffer_arg) {
1467
1467
  return payment_pb.UserWithdrawalItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
1468
1468
  }
1469
1469
 
1470
+ function serialize_payment_WarehouseCasinoEvidenceBatchRequest(arg) {
1471
+ if (!(arg instanceof payment_pb.WarehouseCasinoEvidenceBatchRequest)) {
1472
+ throw new Error('Expected argument of type payment.WarehouseCasinoEvidenceBatchRequest');
1473
+ }
1474
+ return Buffer.from(arg.serializeBinary());
1475
+ }
1476
+
1477
+ function deserialize_payment_WarehouseCasinoEvidenceBatchRequest(buffer_arg) {
1478
+ return payment_pb.WarehouseCasinoEvidenceBatchRequest.deserializeBinary(new Uint8Array(buffer_arg));
1479
+ }
1480
+
1481
+ function serialize_payment_WarehouseCasinoEvidenceBatchResponse(arg) {
1482
+ if (!(arg instanceof payment_pb.WarehouseCasinoEvidenceBatchResponse)) {
1483
+ throw new Error('Expected argument of type payment.WarehouseCasinoEvidenceBatchResponse');
1484
+ }
1485
+ return Buffer.from(arg.serializeBinary());
1486
+ }
1487
+
1488
+ function deserialize_payment_WarehouseCasinoEvidenceBatchResponse(buffer_arg) {
1489
+ return payment_pb.WarehouseCasinoEvidenceBatchResponse.deserializeBinary(new Uint8Array(buffer_arg));
1490
+ }
1491
+
1470
1492
  function serialize_payment_WarehouseCasinoEvidenceRequest(arg) {
1471
1493
  if (!(arg instanceof payment_pb.WarehouseCasinoEvidenceRequest)) {
1472
1494
  throw new Error('Expected argument of type payment.WarehouseCasinoEvidenceRequest');
@@ -1524,6 +1546,18 @@ function deserialize_payment_WithdrawalWebHookRequest(buffer_arg) {
1524
1546
 
1525
1547
 
1526
1548
  var PaymentService = exports.PaymentService = {
1549
+ // One bounded batch (1..200 actions), no N+1 transport.
1550
+ getWarehouseCasinoEvidenceBatch: {
1551
+ path: '/payment.Payment/getWarehouseCasinoEvidenceBatch',
1552
+ requestStream: false,
1553
+ responseStream: false,
1554
+ requestType: payment_pb.WarehouseCasinoEvidenceBatchRequest,
1555
+ responseType: payment_pb.WarehouseCasinoEvidenceBatchResponse,
1556
+ requestSerialize: serialize_payment_WarehouseCasinoEvidenceBatchRequest,
1557
+ requestDeserialize: deserialize_payment_WarehouseCasinoEvidenceBatchRequest,
1558
+ responseSerialize: serialize_payment_WarehouseCasinoEvidenceBatchResponse,
1559
+ responseDeserialize: deserialize_payment_WarehouseCasinoEvidenceBatchResponse,
1560
+ },
1527
1561
  // Bounded read-only exact evidence; no financial commands or raw payloads.
1528
1562
  getWarehouseCasinoEvidence: {
1529
1563
  path: '/payment.Payment/getWarehouseCasinoEvidence',
@@ -207,6 +207,8 @@ goog.exportSymbol('proto.payment.UserWalletOperationHistoryReward', null, global
207
207
  goog.exportSymbol('proto.payment.UserWithdrawalItem', null, global);
208
208
  goog.exportSymbol('proto.payment.UserWithdrawalItemsResponse', null, global);
209
209
  goog.exportSymbol('proto.payment.WalletCashBalanceItem', null, global);
210
+ goog.exportSymbol('proto.payment.WarehouseCasinoEvidenceBatchRequest', null, global);
211
+ goog.exportSymbol('proto.payment.WarehouseCasinoEvidenceBatchResponse', null, global);
210
212
  goog.exportSymbol('proto.payment.WarehouseCasinoEvidenceEntry', null, global);
211
213
  goog.exportSymbol('proto.payment.WarehouseCasinoEvidenceRequest', null, global);
212
214
  goog.exportSymbol('proto.payment.WarehouseCasinoEvidenceResponse', null, global);
@@ -4207,6 +4209,48 @@ if (goog.DEBUG && !COMPILED) {
4207
4209
  */
4208
4210
  proto.payment.WarehouseCasinoEvidenceEntry.displayName = 'proto.payment.WarehouseCasinoEvidenceEntry';
4209
4211
  }
4212
+ /**
4213
+ * Generated by JsPbCodeGenerator.
4214
+ * @param {Array=} opt_data Optional initial data array, typically from a
4215
+ * server response, or constructed directly in Javascript. The array is used
4216
+ * in place and becomes part of the constructed object. It is not cloned.
4217
+ * If no data is provided, the constructed object will be empty, but still
4218
+ * valid.
4219
+ * @extends {jspb.Message}
4220
+ * @constructor
4221
+ */
4222
+ proto.payment.WarehouseCasinoEvidenceBatchRequest = function(opt_data) {
4223
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.payment.WarehouseCasinoEvidenceBatchRequest.repeatedFields_, null);
4224
+ };
4225
+ goog.inherits(proto.payment.WarehouseCasinoEvidenceBatchRequest, jspb.Message);
4226
+ if (goog.DEBUG && !COMPILED) {
4227
+ /**
4228
+ * @public
4229
+ * @override
4230
+ */
4231
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.displayName = 'proto.payment.WarehouseCasinoEvidenceBatchRequest';
4232
+ }
4233
+ /**
4234
+ * Generated by JsPbCodeGenerator.
4235
+ * @param {Array=} opt_data Optional initial data array, typically from a
4236
+ * server response, or constructed directly in Javascript. The array is used
4237
+ * in place and becomes part of the constructed object. It is not cloned.
4238
+ * If no data is provided, the constructed object will be empty, but still
4239
+ * valid.
4240
+ * @extends {jspb.Message}
4241
+ * @constructor
4242
+ */
4243
+ proto.payment.WarehouseCasinoEvidenceBatchResponse = function(opt_data) {
4244
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.payment.WarehouseCasinoEvidenceBatchResponse.repeatedFields_, null);
4245
+ };
4246
+ goog.inherits(proto.payment.WarehouseCasinoEvidenceBatchResponse, jspb.Message);
4247
+ if (goog.DEBUG && !COMPILED) {
4248
+ /**
4249
+ * @public
4250
+ * @override
4251
+ */
4252
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.displayName = 'proto.payment.WarehouseCasinoEvidenceBatchResponse';
4253
+ }
4210
4254
 
4211
4255
 
4212
4256
 
@@ -79593,6 +79637,506 @@ proto.payment.WarehouseCasinoEvidenceEntry.prototype.setDeltaDenominator = funct
79593
79637
  };
79594
79638
 
79595
79639
 
79640
+
79641
+ /**
79642
+ * List of repeated fields within this message type.
79643
+ * @private {!Array<number>}
79644
+ * @const
79645
+ */
79646
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.repeatedFields_ = [3];
79647
+
79648
+
79649
+
79650
+ if (jspb.Message.GENERATE_TO_OBJECT) {
79651
+ /**
79652
+ * Creates an object representation of this proto.
79653
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
79654
+ * Optional fields that are not set will be set to undefined.
79655
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
79656
+ * For the list of reserved names please see:
79657
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
79658
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
79659
+ * JSPB instance for transitional soy proto support:
79660
+ * http://goto/soy-param-migration
79661
+ * @return {!Object}
79662
+ */
79663
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.toObject = function(opt_includeInstance) {
79664
+ return proto.payment.WarehouseCasinoEvidenceBatchRequest.toObject(opt_includeInstance, this);
79665
+ };
79666
+
79667
+
79668
+ /**
79669
+ * Static version of the {@see toObject} method.
79670
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
79671
+ * the JSPB instance for transitional soy proto support:
79672
+ * http://goto/soy-param-migration
79673
+ * @param {!proto.payment.WarehouseCasinoEvidenceBatchRequest} msg The msg instance to transform.
79674
+ * @return {!Object}
79675
+ * @suppress {unusedLocalVariables} f is only used for nested messages
79676
+ */
79677
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.toObject = function(includeInstance, msg) {
79678
+ var f, obj = {
79679
+ customer: jspb.Message.getFieldWithDefault(msg, 1, ""),
79680
+ environment: jspb.Message.getFieldWithDefault(msg, 2, ""),
79681
+ actionsList: jspb.Message.toObjectList(msg.getActionsList(),
79682
+ proto.payment.WarehouseCasinoEvidenceRequest.toObject, includeInstance)
79683
+ };
79684
+
79685
+ if (includeInstance) {
79686
+ obj.$jspbMessageInstance = msg;
79687
+ }
79688
+ return obj;
79689
+ };
79690
+ }
79691
+
79692
+
79693
+ /**
79694
+ * Deserializes binary data (in protobuf wire format).
79695
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
79696
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchRequest}
79697
+ */
79698
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.deserializeBinary = function(bytes) {
79699
+ var reader = new jspb.BinaryReader(bytes);
79700
+ var msg = new proto.payment.WarehouseCasinoEvidenceBatchRequest;
79701
+ return proto.payment.WarehouseCasinoEvidenceBatchRequest.deserializeBinaryFromReader(msg, reader);
79702
+ };
79703
+
79704
+
79705
+ /**
79706
+ * Deserializes binary data (in protobuf wire format) from the
79707
+ * given reader into the given message object.
79708
+ * @param {!proto.payment.WarehouseCasinoEvidenceBatchRequest} msg The message object to deserialize into.
79709
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
79710
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchRequest}
79711
+ */
79712
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.deserializeBinaryFromReader = function(msg, reader) {
79713
+ while (reader.nextField()) {
79714
+ if (reader.isEndGroup()) {
79715
+ break;
79716
+ }
79717
+ var field = reader.getFieldNumber();
79718
+ switch (field) {
79719
+ case 1:
79720
+ var value = /** @type {string} */ (reader.readString());
79721
+ msg.setCustomer(value);
79722
+ break;
79723
+ case 2:
79724
+ var value = /** @type {string} */ (reader.readString());
79725
+ msg.setEnvironment(value);
79726
+ break;
79727
+ case 3:
79728
+ var value = new proto.payment.WarehouseCasinoEvidenceRequest;
79729
+ reader.readMessage(value,proto.payment.WarehouseCasinoEvidenceRequest.deserializeBinaryFromReader);
79730
+ msg.addActions(value);
79731
+ break;
79732
+ default:
79733
+ reader.skipField();
79734
+ break;
79735
+ }
79736
+ }
79737
+ return msg;
79738
+ };
79739
+
79740
+
79741
+ /**
79742
+ * Serializes the message to binary data (in protobuf wire format).
79743
+ * @return {!Uint8Array}
79744
+ */
79745
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.serializeBinary = function() {
79746
+ var writer = new jspb.BinaryWriter();
79747
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.serializeBinaryToWriter(this, writer);
79748
+ return writer.getResultBuffer();
79749
+ };
79750
+
79751
+
79752
+ /**
79753
+ * Serializes the given message to binary data (in protobuf wire
79754
+ * format), writing to the given BinaryWriter.
79755
+ * @param {!proto.payment.WarehouseCasinoEvidenceBatchRequest} message
79756
+ * @param {!jspb.BinaryWriter} writer
79757
+ * @suppress {unusedLocalVariables} f is only used for nested messages
79758
+ */
79759
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.serializeBinaryToWriter = function(message, writer) {
79760
+ var f = undefined;
79761
+ f = message.getCustomer();
79762
+ if (f.length > 0) {
79763
+ writer.writeString(
79764
+ 1,
79765
+ f
79766
+ );
79767
+ }
79768
+ f = message.getEnvironment();
79769
+ if (f.length > 0) {
79770
+ writer.writeString(
79771
+ 2,
79772
+ f
79773
+ );
79774
+ }
79775
+ f = message.getActionsList();
79776
+ if (f.length > 0) {
79777
+ writer.writeRepeatedMessage(
79778
+ 3,
79779
+ f,
79780
+ proto.payment.WarehouseCasinoEvidenceRequest.serializeBinaryToWriter
79781
+ );
79782
+ }
79783
+ };
79784
+
79785
+
79786
+ /**
79787
+ * optional string customer = 1;
79788
+ * @return {string}
79789
+ */
79790
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.getCustomer = function() {
79791
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
79792
+ };
79793
+
79794
+
79795
+ /**
79796
+ * @param {string} value
79797
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchRequest} returns this
79798
+ */
79799
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.setCustomer = function(value) {
79800
+ return jspb.Message.setProto3StringField(this, 1, value);
79801
+ };
79802
+
79803
+
79804
+ /**
79805
+ * optional string environment = 2;
79806
+ * @return {string}
79807
+ */
79808
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.getEnvironment = function() {
79809
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
79810
+ };
79811
+
79812
+
79813
+ /**
79814
+ * @param {string} value
79815
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchRequest} returns this
79816
+ */
79817
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.setEnvironment = function(value) {
79818
+ return jspb.Message.setProto3StringField(this, 2, value);
79819
+ };
79820
+
79821
+
79822
+ /**
79823
+ * repeated WarehouseCasinoEvidenceRequest actions = 3;
79824
+ * @return {!Array<!proto.payment.WarehouseCasinoEvidenceRequest>}
79825
+ */
79826
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.getActionsList = function() {
79827
+ return /** @type{!Array<!proto.payment.WarehouseCasinoEvidenceRequest>} */ (
79828
+ jspb.Message.getRepeatedWrapperField(this, proto.payment.WarehouseCasinoEvidenceRequest, 3));
79829
+ };
79830
+
79831
+
79832
+ /**
79833
+ * @param {!Array<!proto.payment.WarehouseCasinoEvidenceRequest>} value
79834
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchRequest} returns this
79835
+ */
79836
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.setActionsList = function(value) {
79837
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
79838
+ };
79839
+
79840
+
79841
+ /**
79842
+ * @param {!proto.payment.WarehouseCasinoEvidenceRequest=} opt_value
79843
+ * @param {number=} opt_index
79844
+ * @return {!proto.payment.WarehouseCasinoEvidenceRequest}
79845
+ */
79846
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.addActions = function(opt_value, opt_index) {
79847
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.payment.WarehouseCasinoEvidenceRequest, opt_index);
79848
+ };
79849
+
79850
+
79851
+ /**
79852
+ * Clears the list making it empty but non-null.
79853
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchRequest} returns this
79854
+ */
79855
+ proto.payment.WarehouseCasinoEvidenceBatchRequest.prototype.clearActionsList = function() {
79856
+ return this.setActionsList([]);
79857
+ };
79858
+
79859
+
79860
+
79861
+ /**
79862
+ * List of repeated fields within this message type.
79863
+ * @private {!Array<number>}
79864
+ * @const
79865
+ */
79866
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.repeatedFields_ = [3];
79867
+
79868
+
79869
+
79870
+ if (jspb.Message.GENERATE_TO_OBJECT) {
79871
+ /**
79872
+ * Creates an object representation of this proto.
79873
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
79874
+ * Optional fields that are not set will be set to undefined.
79875
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
79876
+ * For the list of reserved names please see:
79877
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
79878
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
79879
+ * JSPB instance for transitional soy proto support:
79880
+ * http://goto/soy-param-migration
79881
+ * @return {!Object}
79882
+ */
79883
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.toObject = function(opt_includeInstance) {
79884
+ return proto.payment.WarehouseCasinoEvidenceBatchResponse.toObject(opt_includeInstance, this);
79885
+ };
79886
+
79887
+
79888
+ /**
79889
+ * Static version of the {@see toObject} method.
79890
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
79891
+ * the JSPB instance for transitional soy proto support:
79892
+ * http://goto/soy-param-migration
79893
+ * @param {!proto.payment.WarehouseCasinoEvidenceBatchResponse} msg The msg instance to transform.
79894
+ * @return {!Object}
79895
+ * @suppress {unusedLocalVariables} f is only used for nested messages
79896
+ */
79897
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.toObject = function(includeInstance, msg) {
79898
+ var f, obj = {
79899
+ customer: jspb.Message.getFieldWithDefault(msg, 1, ""),
79900
+ environment: jspb.Message.getFieldWithDefault(msg, 2, ""),
79901
+ actionsList: jspb.Message.toObjectList(msg.getActionsList(),
79902
+ proto.payment.WarehouseCasinoEvidenceResponse.toObject, includeInstance),
79903
+ sqlQueries: jspb.Message.getFieldWithDefault(msg, 4, 0),
79904
+ elapsedMs: jspb.Message.getFieldWithDefault(msg, 5, 0)
79905
+ };
79906
+
79907
+ if (includeInstance) {
79908
+ obj.$jspbMessageInstance = msg;
79909
+ }
79910
+ return obj;
79911
+ };
79912
+ }
79913
+
79914
+
79915
+ /**
79916
+ * Deserializes binary data (in protobuf wire format).
79917
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
79918
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse}
79919
+ */
79920
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.deserializeBinary = function(bytes) {
79921
+ var reader = new jspb.BinaryReader(bytes);
79922
+ var msg = new proto.payment.WarehouseCasinoEvidenceBatchResponse;
79923
+ return proto.payment.WarehouseCasinoEvidenceBatchResponse.deserializeBinaryFromReader(msg, reader);
79924
+ };
79925
+
79926
+
79927
+ /**
79928
+ * Deserializes binary data (in protobuf wire format) from the
79929
+ * given reader into the given message object.
79930
+ * @param {!proto.payment.WarehouseCasinoEvidenceBatchResponse} msg The message object to deserialize into.
79931
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
79932
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse}
79933
+ */
79934
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.deserializeBinaryFromReader = function(msg, reader) {
79935
+ while (reader.nextField()) {
79936
+ if (reader.isEndGroup()) {
79937
+ break;
79938
+ }
79939
+ var field = reader.getFieldNumber();
79940
+ switch (field) {
79941
+ case 1:
79942
+ var value = /** @type {string} */ (reader.readString());
79943
+ msg.setCustomer(value);
79944
+ break;
79945
+ case 2:
79946
+ var value = /** @type {string} */ (reader.readString());
79947
+ msg.setEnvironment(value);
79948
+ break;
79949
+ case 3:
79950
+ var value = new proto.payment.WarehouseCasinoEvidenceResponse;
79951
+ reader.readMessage(value,proto.payment.WarehouseCasinoEvidenceResponse.deserializeBinaryFromReader);
79952
+ msg.addActions(value);
79953
+ break;
79954
+ case 4:
79955
+ var value = /** @type {number} */ (reader.readUint32());
79956
+ msg.setSqlQueries(value);
79957
+ break;
79958
+ case 5:
79959
+ var value = /** @type {number} */ (reader.readUint32());
79960
+ msg.setElapsedMs(value);
79961
+ break;
79962
+ default:
79963
+ reader.skipField();
79964
+ break;
79965
+ }
79966
+ }
79967
+ return msg;
79968
+ };
79969
+
79970
+
79971
+ /**
79972
+ * Serializes the message to binary data (in protobuf wire format).
79973
+ * @return {!Uint8Array}
79974
+ */
79975
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.serializeBinary = function() {
79976
+ var writer = new jspb.BinaryWriter();
79977
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.serializeBinaryToWriter(this, writer);
79978
+ return writer.getResultBuffer();
79979
+ };
79980
+
79981
+
79982
+ /**
79983
+ * Serializes the given message to binary data (in protobuf wire
79984
+ * format), writing to the given BinaryWriter.
79985
+ * @param {!proto.payment.WarehouseCasinoEvidenceBatchResponse} message
79986
+ * @param {!jspb.BinaryWriter} writer
79987
+ * @suppress {unusedLocalVariables} f is only used for nested messages
79988
+ */
79989
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.serializeBinaryToWriter = function(message, writer) {
79990
+ var f = undefined;
79991
+ f = message.getCustomer();
79992
+ if (f.length > 0) {
79993
+ writer.writeString(
79994
+ 1,
79995
+ f
79996
+ );
79997
+ }
79998
+ f = message.getEnvironment();
79999
+ if (f.length > 0) {
80000
+ writer.writeString(
80001
+ 2,
80002
+ f
80003
+ );
80004
+ }
80005
+ f = message.getActionsList();
80006
+ if (f.length > 0) {
80007
+ writer.writeRepeatedMessage(
80008
+ 3,
80009
+ f,
80010
+ proto.payment.WarehouseCasinoEvidenceResponse.serializeBinaryToWriter
80011
+ );
80012
+ }
80013
+ f = message.getSqlQueries();
80014
+ if (f !== 0) {
80015
+ writer.writeUint32(
80016
+ 4,
80017
+ f
80018
+ );
80019
+ }
80020
+ f = message.getElapsedMs();
80021
+ if (f !== 0) {
80022
+ writer.writeUint32(
80023
+ 5,
80024
+ f
80025
+ );
80026
+ }
80027
+ };
80028
+
80029
+
80030
+ /**
80031
+ * optional string customer = 1;
80032
+ * @return {string}
80033
+ */
80034
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.getCustomer = function() {
80035
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
80036
+ };
80037
+
80038
+
80039
+ /**
80040
+ * @param {string} value
80041
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse} returns this
80042
+ */
80043
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.setCustomer = function(value) {
80044
+ return jspb.Message.setProto3StringField(this, 1, value);
80045
+ };
80046
+
80047
+
80048
+ /**
80049
+ * optional string environment = 2;
80050
+ * @return {string}
80051
+ */
80052
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.getEnvironment = function() {
80053
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
80054
+ };
80055
+
80056
+
80057
+ /**
80058
+ * @param {string} value
80059
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse} returns this
80060
+ */
80061
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.setEnvironment = function(value) {
80062
+ return jspb.Message.setProto3StringField(this, 2, value);
80063
+ };
80064
+
80065
+
80066
+ /**
80067
+ * repeated WarehouseCasinoEvidenceResponse actions = 3;
80068
+ * @return {!Array<!proto.payment.WarehouseCasinoEvidenceResponse>}
80069
+ */
80070
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.getActionsList = function() {
80071
+ return /** @type{!Array<!proto.payment.WarehouseCasinoEvidenceResponse>} */ (
80072
+ jspb.Message.getRepeatedWrapperField(this, proto.payment.WarehouseCasinoEvidenceResponse, 3));
80073
+ };
80074
+
80075
+
80076
+ /**
80077
+ * @param {!Array<!proto.payment.WarehouseCasinoEvidenceResponse>} value
80078
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse} returns this
80079
+ */
80080
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.setActionsList = function(value) {
80081
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
80082
+ };
80083
+
80084
+
80085
+ /**
80086
+ * @param {!proto.payment.WarehouseCasinoEvidenceResponse=} opt_value
80087
+ * @param {number=} opt_index
80088
+ * @return {!proto.payment.WarehouseCasinoEvidenceResponse}
80089
+ */
80090
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.addActions = function(opt_value, opt_index) {
80091
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.payment.WarehouseCasinoEvidenceResponse, opt_index);
80092
+ };
80093
+
80094
+
80095
+ /**
80096
+ * Clears the list making it empty but non-null.
80097
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse} returns this
80098
+ */
80099
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.clearActionsList = function() {
80100
+ return this.setActionsList([]);
80101
+ };
80102
+
80103
+
80104
+ /**
80105
+ * optional uint32 sql_queries = 4;
80106
+ * @return {number}
80107
+ */
80108
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.getSqlQueries = function() {
80109
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
80110
+ };
80111
+
80112
+
80113
+ /**
80114
+ * @param {number} value
80115
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse} returns this
80116
+ */
80117
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.setSqlQueries = function(value) {
80118
+ return jspb.Message.setProto3IntField(this, 4, value);
80119
+ };
80120
+
80121
+
80122
+ /**
80123
+ * optional uint32 elapsed_ms = 5;
80124
+ * @return {number}
80125
+ */
80126
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.getElapsedMs = function() {
80127
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
80128
+ };
80129
+
80130
+
80131
+ /**
80132
+ * @param {number} value
80133
+ * @return {!proto.payment.WarehouseCasinoEvidenceBatchResponse} returns this
80134
+ */
80135
+ proto.payment.WarehouseCasinoEvidenceBatchResponse.prototype.setElapsedMs = function(value) {
80136
+ return jspb.Message.setProto3IntField(this, 5, value);
80137
+ };
80138
+
80139
+
79596
80140
  /**
79597
80141
  * @enum {number}
79598
80142
  */
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+ const assert = require('node:assert/strict');
3
+ const { game, gRPC: grpc } = require('..');
4
+ const M = game.messages;
5
+ async function main() {
6
+ const identity = new M.HistoricalCasinoIdentity();
7
+ for (const [k,v] of Object.entries({SourceActionId:'9007199254740993',UserId:'7',Action:'bet',TransactionId:'tx',SessionId:'session',RoundId:'round',GameUuid:'uuid',Currency:'USD'})) identity['set'+k](v);
8
+ const req = new M.HistoricalCasinoIdentityRequest();
9
+ req.setCustomer('fixture'); req.setEnvironment('localhost'); req.addIdentities(identity);
10
+ assert.deepEqual(M.HistoricalCasinoIdentityRequest.deserializeBinary(req.serializeBinary()).toObject(), req.toObject());
11
+ const result = new M.HistoricalCasinoIdentityResult();
12
+ result.setIdentity(identity); result.setPrIntId('42'); result.setSlugAbsenceProven(true); result.setCurrencyScale(0); result.setSourceService('game'); result.setProvenance('game_legacy_ordering_v1'); result.setEvidenceSha256('a'.repeat(64));
13
+ const decoded = M.HistoricalCasinoIdentityResult.deserializeBinary(result.serializeBinary());
14
+ assert.equal(decoded.hasPrSlug(),false); assert.equal(decoded.hasCurrencyScale(),true); assert.equal(decoded.getCurrencyScale(),0); assert.equal(decoded.getSlugAbsenceProven(),true);
15
+ result.setPrSlug(''); assert.equal(M.HistoricalCasinoIdentityResult.deserializeBinary(result.serializeBinary()).hasPrSlug(),true);
16
+ const server = new grpc.Server();
17
+ server.addService(game.service.GameService,{getHistoricalCasinoIdentityEvidence:(call,cb)=>{
18
+ assert.deepEqual(call.request.toObject(),req.toObject());
19
+ const response = new M.HistoricalCasinoIdentityResponse(); response.setCustomer('fixture'); response.setEnvironment('localhost'); response.addResults(result); cb(null,response);
20
+ }});
21
+ const port = await new Promise((res,rej)=>server.bindAsync('127.0.0.1:0',grpc.ServerCredentials.createInsecure(),(e,p)=>e?rej(e):res(p)));
22
+ const client = new game.service.GameClient('127.0.0.1:'+port,grpc.credentials.createInsecure());
23
+ try { const response=await new Promise((res,rej)=>client.getHistoricalCasinoIdentityEvidence(req,{deadline:Date.now()+3000},(e,v)=>e?rej(e):res(v))); assert.deepEqual(response.getResultsList()[0].toObject(),result.toObject()); }
24
+ finally {client.close();await new Promise(r=>server.tryShutdown(r));}
25
+ console.log('PASS historical Casino identity wire + real gRPC');
26
+ }
27
+ main().catch(e=>{console.error(e);process.exitCode=1;});