protobuf-platform 1.2.690 → 1.2.692

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.690",
3
+ "version": "1.2.692",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1002,6 +1002,10 @@ message GetUserFinancialSummaryResponse {
1002
1002
  message ResolveGameWalletContextRequest {
1003
1003
  int32 user_id = 1;
1004
1004
  optional string wallet_currency = 2;
1005
+ // Opt-in authoritative bonus bucket read for terminal/recovery verification.
1006
+ optional bool include_bonus_balance = 3;
1007
+ // Explicit setup opt-in; never implies automatic enrollment of existing callers.
1008
+ optional bool prepare_financial_admission = 4;
1005
1009
  }
1006
1010
  message ResolveGameWalletContextResponse {
1007
1011
  int32 user_id = 1;
@@ -1009,6 +1013,17 @@ message ResolveGameWalletContextResponse {
1009
1013
  int32 currency_scale = 3;
1010
1014
  int64 balance_minor = 4 [jstype = JS_STRING];
1011
1015
  string balance_major = 5;
1016
+ // Exact minor units in wallet_currency. Absent means unavailable; "0" is confirmed zero.
1017
+ optional string bonus_balance_minor = 6;
1018
+ optional FinancialAdmissionWalletContext financial_admission = 7;
1019
+ }
1020
+ message FinancialAdmissionWalletContext {
1021
+ uint32 protocol_version = 1;
1022
+ string wallet_reference = 2;
1023
+ string ownership_epoch = 3;
1024
+ string admission_version = 4;
1025
+ string cash_ledger_entry_id = 5;
1026
+ optional string bonus_ledger_entry_id = 6;
1012
1027
  }
1013
1028
  //Segmentation
1014
1029
  message SegmentedUserRequest {
@@ -64,6 +64,7 @@ goog.exportSymbol('proto.payment.DepositWebHookRequest', null, global);
64
64
  goog.exportSymbol('proto.payment.ExecuteGameplayPrecisionCommandRequest', null, global);
65
65
  goog.exportSymbol('proto.payment.ExecuteManualWithdrawalRequest', null, global);
66
66
  goog.exportSymbol('proto.payment.File', null, global);
67
+ goog.exportSymbol('proto.payment.FinancialAdmissionWalletContext', null, global);
67
68
  goog.exportSymbol('proto.payment.FinancialOperationResponse', null, global);
68
69
  goog.exportSymbol('proto.payment.GameplayPrecisionAccountingLeg', null, global);
69
70
  goog.exportSymbol('proto.payment.GameplayPrecisionLeg', null, global);
@@ -2115,6 +2116,27 @@ if (goog.DEBUG && !COMPILED) {
2115
2116
  */
2116
2117
  proto.payment.ResolveGameWalletContextResponse.displayName = 'proto.payment.ResolveGameWalletContextResponse';
2117
2118
  }
2119
+ /**
2120
+ * Generated by JsPbCodeGenerator.
2121
+ * @param {Array=} opt_data Optional initial data array, typically from a
2122
+ * server response, or constructed directly in Javascript. The array is used
2123
+ * in place and becomes part of the constructed object. It is not cloned.
2124
+ * If no data is provided, the constructed object will be empty, but still
2125
+ * valid.
2126
+ * @extends {jspb.Message}
2127
+ * @constructor
2128
+ */
2129
+ proto.payment.FinancialAdmissionWalletContext = function(opt_data) {
2130
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
2131
+ };
2132
+ goog.inherits(proto.payment.FinancialAdmissionWalletContext, jspb.Message);
2133
+ if (goog.DEBUG && !COMPILED) {
2134
+ /**
2135
+ * @public
2136
+ * @override
2137
+ */
2138
+ proto.payment.FinancialAdmissionWalletContext.displayName = 'proto.payment.FinancialAdmissionWalletContext';
2139
+ }
2118
2140
  /**
2119
2141
  * Generated by JsPbCodeGenerator.
2120
2142
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -42415,7 +42437,9 @@ proto.payment.ResolveGameWalletContextRequest.prototype.toObject = function(opt_
42415
42437
  proto.payment.ResolveGameWalletContextRequest.toObject = function(includeInstance, msg) {
42416
42438
  var f, obj = {
42417
42439
  userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
42418
- walletCurrency: jspb.Message.getFieldWithDefault(msg, 2, "")
42440
+ walletCurrency: jspb.Message.getFieldWithDefault(msg, 2, ""),
42441
+ includeBonusBalance: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
42442
+ prepareFinancialAdmission: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
42419
42443
  };
42420
42444
 
42421
42445
  if (includeInstance) {
@@ -42460,6 +42484,14 @@ proto.payment.ResolveGameWalletContextRequest.deserializeBinaryFromReader = func
42460
42484
  var value = /** @type {string} */ (reader.readString());
42461
42485
  msg.setWalletCurrency(value);
42462
42486
  break;
42487
+ case 3:
42488
+ var value = /** @type {boolean} */ (reader.readBool());
42489
+ msg.setIncludeBonusBalance(value);
42490
+ break;
42491
+ case 4:
42492
+ var value = /** @type {boolean} */ (reader.readBool());
42493
+ msg.setPrepareFinancialAdmission(value);
42494
+ break;
42463
42495
  default:
42464
42496
  reader.skipField();
42465
42497
  break;
@@ -42503,6 +42535,20 @@ proto.payment.ResolveGameWalletContextRequest.serializeBinaryToWriter = function
42503
42535
  f
42504
42536
  );
42505
42537
  }
42538
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
42539
+ if (f != null) {
42540
+ writer.writeBool(
42541
+ 3,
42542
+ f
42543
+ );
42544
+ }
42545
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
42546
+ if (f != null) {
42547
+ writer.writeBool(
42548
+ 4,
42549
+ f
42550
+ );
42551
+ }
42506
42552
  };
42507
42553
 
42508
42554
 
@@ -42560,6 +42606,78 @@ proto.payment.ResolveGameWalletContextRequest.prototype.hasWalletCurrency = func
42560
42606
  };
42561
42607
 
42562
42608
 
42609
+ /**
42610
+ * optional bool include_bonus_balance = 3;
42611
+ * @return {boolean}
42612
+ */
42613
+ proto.payment.ResolveGameWalletContextRequest.prototype.getIncludeBonusBalance = function() {
42614
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
42615
+ };
42616
+
42617
+
42618
+ /**
42619
+ * @param {boolean} value
42620
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
42621
+ */
42622
+ proto.payment.ResolveGameWalletContextRequest.prototype.setIncludeBonusBalance = function(value) {
42623
+ return jspb.Message.setField(this, 3, value);
42624
+ };
42625
+
42626
+
42627
+ /**
42628
+ * Clears the field making it undefined.
42629
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
42630
+ */
42631
+ proto.payment.ResolveGameWalletContextRequest.prototype.clearIncludeBonusBalance = function() {
42632
+ return jspb.Message.setField(this, 3, undefined);
42633
+ };
42634
+
42635
+
42636
+ /**
42637
+ * Returns whether this field is set.
42638
+ * @return {boolean}
42639
+ */
42640
+ proto.payment.ResolveGameWalletContextRequest.prototype.hasIncludeBonusBalance = function() {
42641
+ return jspb.Message.getField(this, 3) != null;
42642
+ };
42643
+
42644
+
42645
+ /**
42646
+ * optional bool prepare_financial_admission = 4;
42647
+ * @return {boolean}
42648
+ */
42649
+ proto.payment.ResolveGameWalletContextRequest.prototype.getPrepareFinancialAdmission = function() {
42650
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
42651
+ };
42652
+
42653
+
42654
+ /**
42655
+ * @param {boolean} value
42656
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
42657
+ */
42658
+ proto.payment.ResolveGameWalletContextRequest.prototype.setPrepareFinancialAdmission = function(value) {
42659
+ return jspb.Message.setField(this, 4, value);
42660
+ };
42661
+
42662
+
42663
+ /**
42664
+ * Clears the field making it undefined.
42665
+ * @return {!proto.payment.ResolveGameWalletContextRequest} returns this
42666
+ */
42667
+ proto.payment.ResolveGameWalletContextRequest.prototype.clearPrepareFinancialAdmission = function() {
42668
+ return jspb.Message.setField(this, 4, undefined);
42669
+ };
42670
+
42671
+
42672
+ /**
42673
+ * Returns whether this field is set.
42674
+ * @return {boolean}
42675
+ */
42676
+ proto.payment.ResolveGameWalletContextRequest.prototype.hasPrepareFinancialAdmission = function() {
42677
+ return jspb.Message.getField(this, 4) != null;
42678
+ };
42679
+
42680
+
42563
42681
 
42564
42682
 
42565
42683
 
@@ -42596,7 +42714,9 @@ proto.payment.ResolveGameWalletContextResponse.toObject = function(includeInstan
42596
42714
  walletCurrency: jspb.Message.getFieldWithDefault(msg, 2, ""),
42597
42715
  currencyScale: jspb.Message.getFieldWithDefault(msg, 3, 0),
42598
42716
  balanceMinor: jspb.Message.getFieldWithDefault(msg, 4, "0"),
42599
- balanceMajor: jspb.Message.getFieldWithDefault(msg, 5, "")
42717
+ balanceMajor: jspb.Message.getFieldWithDefault(msg, 5, ""),
42718
+ bonusBalanceMinor: jspb.Message.getFieldWithDefault(msg, 6, ""),
42719
+ financialAdmission: (f = msg.getFinancialAdmission()) && proto.payment.FinancialAdmissionWalletContext.toObject(includeInstance, f)
42600
42720
  };
42601
42721
 
42602
42722
  if (includeInstance) {
@@ -42653,6 +42773,15 @@ proto.payment.ResolveGameWalletContextResponse.deserializeBinaryFromReader = fun
42653
42773
  var value = /** @type {string} */ (reader.readString());
42654
42774
  msg.setBalanceMajor(value);
42655
42775
  break;
42776
+ case 6:
42777
+ var value = /** @type {string} */ (reader.readString());
42778
+ msg.setBonusBalanceMinor(value);
42779
+ break;
42780
+ case 7:
42781
+ var value = new proto.payment.FinancialAdmissionWalletContext;
42782
+ reader.readMessage(value,proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader);
42783
+ msg.setFinancialAdmission(value);
42784
+ break;
42656
42785
  default:
42657
42786
  reader.skipField();
42658
42787
  break;
@@ -42717,6 +42846,21 @@ proto.payment.ResolveGameWalletContextResponse.serializeBinaryToWriter = functio
42717
42846
  f
42718
42847
  );
42719
42848
  }
42849
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
42850
+ if (f != null) {
42851
+ writer.writeString(
42852
+ 6,
42853
+ f
42854
+ );
42855
+ }
42856
+ f = message.getFinancialAdmission();
42857
+ if (f != null) {
42858
+ writer.writeMessage(
42859
+ 7,
42860
+ f,
42861
+ proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter
42862
+ );
42863
+ }
42720
42864
  };
42721
42865
 
42722
42866
 
@@ -42810,6 +42954,377 @@ proto.payment.ResolveGameWalletContextResponse.prototype.setBalanceMajor = funct
42810
42954
  };
42811
42955
 
42812
42956
 
42957
+ /**
42958
+ * optional string bonus_balance_minor = 6;
42959
+ * @return {string}
42960
+ */
42961
+ proto.payment.ResolveGameWalletContextResponse.prototype.getBonusBalanceMinor = function() {
42962
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
42963
+ };
42964
+
42965
+
42966
+ /**
42967
+ * @param {string} value
42968
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
42969
+ */
42970
+ proto.payment.ResolveGameWalletContextResponse.prototype.setBonusBalanceMinor = function(value) {
42971
+ return jspb.Message.setField(this, 6, value);
42972
+ };
42973
+
42974
+
42975
+ /**
42976
+ * Clears the field making it undefined.
42977
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
42978
+ */
42979
+ proto.payment.ResolveGameWalletContextResponse.prototype.clearBonusBalanceMinor = function() {
42980
+ return jspb.Message.setField(this, 6, undefined);
42981
+ };
42982
+
42983
+
42984
+ /**
42985
+ * Returns whether this field is set.
42986
+ * @return {boolean}
42987
+ */
42988
+ proto.payment.ResolveGameWalletContextResponse.prototype.hasBonusBalanceMinor = function() {
42989
+ return jspb.Message.getField(this, 6) != null;
42990
+ };
42991
+
42992
+
42993
+ /**
42994
+ * optional FinancialAdmissionWalletContext financial_admission = 7;
42995
+ * @return {?proto.payment.FinancialAdmissionWalletContext}
42996
+ */
42997
+ proto.payment.ResolveGameWalletContextResponse.prototype.getFinancialAdmission = function() {
42998
+ return /** @type{?proto.payment.FinancialAdmissionWalletContext} */ (
42999
+ jspb.Message.getWrapperField(this, proto.payment.FinancialAdmissionWalletContext, 7));
43000
+ };
43001
+
43002
+
43003
+ /**
43004
+ * @param {?proto.payment.FinancialAdmissionWalletContext|undefined} value
43005
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
43006
+ */
43007
+ proto.payment.ResolveGameWalletContextResponse.prototype.setFinancialAdmission = function(value) {
43008
+ return jspb.Message.setWrapperField(this, 7, value);
43009
+ };
43010
+
43011
+
43012
+ /**
43013
+ * Clears the message field making it undefined.
43014
+ * @return {!proto.payment.ResolveGameWalletContextResponse} returns this
43015
+ */
43016
+ proto.payment.ResolveGameWalletContextResponse.prototype.clearFinancialAdmission = function() {
43017
+ return this.setFinancialAdmission(undefined);
43018
+ };
43019
+
43020
+
43021
+ /**
43022
+ * Returns whether this field is set.
43023
+ * @return {boolean}
43024
+ */
43025
+ proto.payment.ResolveGameWalletContextResponse.prototype.hasFinancialAdmission = function() {
43026
+ return jspb.Message.getField(this, 7) != null;
43027
+ };
43028
+
43029
+
43030
+
43031
+
43032
+
43033
+ if (jspb.Message.GENERATE_TO_OBJECT) {
43034
+ /**
43035
+ * Creates an object representation of this proto.
43036
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
43037
+ * Optional fields that are not set will be set to undefined.
43038
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
43039
+ * For the list of reserved names please see:
43040
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
43041
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
43042
+ * JSPB instance for transitional soy proto support:
43043
+ * http://goto/soy-param-migration
43044
+ * @return {!Object}
43045
+ */
43046
+ proto.payment.FinancialAdmissionWalletContext.prototype.toObject = function(opt_includeInstance) {
43047
+ return proto.payment.FinancialAdmissionWalletContext.toObject(opt_includeInstance, this);
43048
+ };
43049
+
43050
+
43051
+ /**
43052
+ * Static version of the {@see toObject} method.
43053
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
43054
+ * the JSPB instance for transitional soy proto support:
43055
+ * http://goto/soy-param-migration
43056
+ * @param {!proto.payment.FinancialAdmissionWalletContext} msg The msg instance to transform.
43057
+ * @return {!Object}
43058
+ * @suppress {unusedLocalVariables} f is only used for nested messages
43059
+ */
43060
+ proto.payment.FinancialAdmissionWalletContext.toObject = function(includeInstance, msg) {
43061
+ var f, obj = {
43062
+ protocolVersion: jspb.Message.getFieldWithDefault(msg, 1, 0),
43063
+ walletReference: jspb.Message.getFieldWithDefault(msg, 2, ""),
43064
+ ownershipEpoch: jspb.Message.getFieldWithDefault(msg, 3, ""),
43065
+ admissionVersion: jspb.Message.getFieldWithDefault(msg, 4, ""),
43066
+ cashLedgerEntryId: jspb.Message.getFieldWithDefault(msg, 5, ""),
43067
+ bonusLedgerEntryId: jspb.Message.getFieldWithDefault(msg, 6, "")
43068
+ };
43069
+
43070
+ if (includeInstance) {
43071
+ obj.$jspbMessageInstance = msg;
43072
+ }
43073
+ return obj;
43074
+ };
43075
+ }
43076
+
43077
+
43078
+ /**
43079
+ * Deserializes binary data (in protobuf wire format).
43080
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
43081
+ * @return {!proto.payment.FinancialAdmissionWalletContext}
43082
+ */
43083
+ proto.payment.FinancialAdmissionWalletContext.deserializeBinary = function(bytes) {
43084
+ var reader = new jspb.BinaryReader(bytes);
43085
+ var msg = new proto.payment.FinancialAdmissionWalletContext;
43086
+ return proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader(msg, reader);
43087
+ };
43088
+
43089
+
43090
+ /**
43091
+ * Deserializes binary data (in protobuf wire format) from the
43092
+ * given reader into the given message object.
43093
+ * @param {!proto.payment.FinancialAdmissionWalletContext} msg The message object to deserialize into.
43094
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
43095
+ * @return {!proto.payment.FinancialAdmissionWalletContext}
43096
+ */
43097
+ proto.payment.FinancialAdmissionWalletContext.deserializeBinaryFromReader = function(msg, reader) {
43098
+ while (reader.nextField()) {
43099
+ if (reader.isEndGroup()) {
43100
+ break;
43101
+ }
43102
+ var field = reader.getFieldNumber();
43103
+ switch (field) {
43104
+ case 1:
43105
+ var value = /** @type {number} */ (reader.readUint32());
43106
+ msg.setProtocolVersion(value);
43107
+ break;
43108
+ case 2:
43109
+ var value = /** @type {string} */ (reader.readString());
43110
+ msg.setWalletReference(value);
43111
+ break;
43112
+ case 3:
43113
+ var value = /** @type {string} */ (reader.readString());
43114
+ msg.setOwnershipEpoch(value);
43115
+ break;
43116
+ case 4:
43117
+ var value = /** @type {string} */ (reader.readString());
43118
+ msg.setAdmissionVersion(value);
43119
+ break;
43120
+ case 5:
43121
+ var value = /** @type {string} */ (reader.readString());
43122
+ msg.setCashLedgerEntryId(value);
43123
+ break;
43124
+ case 6:
43125
+ var value = /** @type {string} */ (reader.readString());
43126
+ msg.setBonusLedgerEntryId(value);
43127
+ break;
43128
+ default:
43129
+ reader.skipField();
43130
+ break;
43131
+ }
43132
+ }
43133
+ return msg;
43134
+ };
43135
+
43136
+
43137
+ /**
43138
+ * Serializes the message to binary data (in protobuf wire format).
43139
+ * @return {!Uint8Array}
43140
+ */
43141
+ proto.payment.FinancialAdmissionWalletContext.prototype.serializeBinary = function() {
43142
+ var writer = new jspb.BinaryWriter();
43143
+ proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter(this, writer);
43144
+ return writer.getResultBuffer();
43145
+ };
43146
+
43147
+
43148
+ /**
43149
+ * Serializes the given message to binary data (in protobuf wire
43150
+ * format), writing to the given BinaryWriter.
43151
+ * @param {!proto.payment.FinancialAdmissionWalletContext} message
43152
+ * @param {!jspb.BinaryWriter} writer
43153
+ * @suppress {unusedLocalVariables} f is only used for nested messages
43154
+ */
43155
+ proto.payment.FinancialAdmissionWalletContext.serializeBinaryToWriter = function(message, writer) {
43156
+ var f = undefined;
43157
+ f = message.getProtocolVersion();
43158
+ if (f !== 0) {
43159
+ writer.writeUint32(
43160
+ 1,
43161
+ f
43162
+ );
43163
+ }
43164
+ f = message.getWalletReference();
43165
+ if (f.length > 0) {
43166
+ writer.writeString(
43167
+ 2,
43168
+ f
43169
+ );
43170
+ }
43171
+ f = message.getOwnershipEpoch();
43172
+ if (f.length > 0) {
43173
+ writer.writeString(
43174
+ 3,
43175
+ f
43176
+ );
43177
+ }
43178
+ f = message.getAdmissionVersion();
43179
+ if (f.length > 0) {
43180
+ writer.writeString(
43181
+ 4,
43182
+ f
43183
+ );
43184
+ }
43185
+ f = message.getCashLedgerEntryId();
43186
+ if (f.length > 0) {
43187
+ writer.writeString(
43188
+ 5,
43189
+ f
43190
+ );
43191
+ }
43192
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
43193
+ if (f != null) {
43194
+ writer.writeString(
43195
+ 6,
43196
+ f
43197
+ );
43198
+ }
43199
+ };
43200
+
43201
+
43202
+ /**
43203
+ * optional uint32 protocol_version = 1;
43204
+ * @return {number}
43205
+ */
43206
+ proto.payment.FinancialAdmissionWalletContext.prototype.getProtocolVersion = function() {
43207
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
43208
+ };
43209
+
43210
+
43211
+ /**
43212
+ * @param {number} value
43213
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43214
+ */
43215
+ proto.payment.FinancialAdmissionWalletContext.prototype.setProtocolVersion = function(value) {
43216
+ return jspb.Message.setProto3IntField(this, 1, value);
43217
+ };
43218
+
43219
+
43220
+ /**
43221
+ * optional string wallet_reference = 2;
43222
+ * @return {string}
43223
+ */
43224
+ proto.payment.FinancialAdmissionWalletContext.prototype.getWalletReference = function() {
43225
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
43226
+ };
43227
+
43228
+
43229
+ /**
43230
+ * @param {string} value
43231
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43232
+ */
43233
+ proto.payment.FinancialAdmissionWalletContext.prototype.setWalletReference = function(value) {
43234
+ return jspb.Message.setProto3StringField(this, 2, value);
43235
+ };
43236
+
43237
+
43238
+ /**
43239
+ * optional string ownership_epoch = 3;
43240
+ * @return {string}
43241
+ */
43242
+ proto.payment.FinancialAdmissionWalletContext.prototype.getOwnershipEpoch = function() {
43243
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
43244
+ };
43245
+
43246
+
43247
+ /**
43248
+ * @param {string} value
43249
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43250
+ */
43251
+ proto.payment.FinancialAdmissionWalletContext.prototype.setOwnershipEpoch = function(value) {
43252
+ return jspb.Message.setProto3StringField(this, 3, value);
43253
+ };
43254
+
43255
+
43256
+ /**
43257
+ * optional string admission_version = 4;
43258
+ * @return {string}
43259
+ */
43260
+ proto.payment.FinancialAdmissionWalletContext.prototype.getAdmissionVersion = function() {
43261
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
43262
+ };
43263
+
43264
+
43265
+ /**
43266
+ * @param {string} value
43267
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43268
+ */
43269
+ proto.payment.FinancialAdmissionWalletContext.prototype.setAdmissionVersion = function(value) {
43270
+ return jspb.Message.setProto3StringField(this, 4, value);
43271
+ };
43272
+
43273
+
43274
+ /**
43275
+ * optional string cash_ledger_entry_id = 5;
43276
+ * @return {string}
43277
+ */
43278
+ proto.payment.FinancialAdmissionWalletContext.prototype.getCashLedgerEntryId = function() {
43279
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
43280
+ };
43281
+
43282
+
43283
+ /**
43284
+ * @param {string} value
43285
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43286
+ */
43287
+ proto.payment.FinancialAdmissionWalletContext.prototype.setCashLedgerEntryId = function(value) {
43288
+ return jspb.Message.setProto3StringField(this, 5, value);
43289
+ };
43290
+
43291
+
43292
+ /**
43293
+ * optional string bonus_ledger_entry_id = 6;
43294
+ * @return {string}
43295
+ */
43296
+ proto.payment.FinancialAdmissionWalletContext.prototype.getBonusLedgerEntryId = function() {
43297
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
43298
+ };
43299
+
43300
+
43301
+ /**
43302
+ * @param {string} value
43303
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43304
+ */
43305
+ proto.payment.FinancialAdmissionWalletContext.prototype.setBonusLedgerEntryId = function(value) {
43306
+ return jspb.Message.setField(this, 6, value);
43307
+ };
43308
+
43309
+
43310
+ /**
43311
+ * Clears the field making it undefined.
43312
+ * @return {!proto.payment.FinancialAdmissionWalletContext} returns this
43313
+ */
43314
+ proto.payment.FinancialAdmissionWalletContext.prototype.clearBonusLedgerEntryId = function() {
43315
+ return jspb.Message.setField(this, 6, undefined);
43316
+ };
43317
+
43318
+
43319
+ /**
43320
+ * Returns whether this field is set.
43321
+ * @return {boolean}
43322
+ */
43323
+ proto.payment.FinancialAdmissionWalletContext.prototype.hasBonusLedgerEntryId = function() {
43324
+ return jspb.Message.getField(this, 6) != null;
43325
+ };
43326
+
43327
+
42813
43328
 
42814
43329
  /**
42815
43330
  * List of repeated fields within this message type.
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ const assert = require('node:assert/strict');
4
+ const vm = require('node:vm');
5
+ const { execFileSync } = require('node:child_process');
6
+ const { createRequire } = require('node:module');
7
+ const path = require('node:path');
8
+ const current = require('../payment/payment_pb');
9
+ const filename = path.resolve(__dirname, '../payment/payment_pb.js');
10
+ const baseline = execFileSync('git', ['show', '96b2d7e:payment/payment_pb.js'], {
11
+ cwd: path.resolve(__dirname, '..'), encoding: 'utf8', maxBuffer: 8 * 1024 * 1024,
12
+ });
13
+ const moduleBefore = { exports: {} };
14
+ vm.runInNewContext(baseline, {
15
+ module: moduleBefore, exports: moduleBefore.exports, require: createRequire(filename),
16
+ }, { filename: 'baseline-payment_pb.js' });
17
+ const previous = moduleBefore.exports;
18
+
19
+ const request = (bindings) => {
20
+ const value = new bindings.ResolveGameWalletContextRequest();
21
+ value.setUserId(7001); value.setWalletCurrency('EUR'); value.setIncludeBonusBalance(true);
22
+ return value;
23
+ };
24
+ const oldRequest = request(previous);
25
+ const nextRequest = request(current);
26
+ assert.deepEqual(Buffer.from(nextRequest.serializeBinary()), Buffer.from(oldRequest.serializeBinary()));
27
+ assert.equal(nextRequest.hasPrepareFinancialAdmission(), false);
28
+ assert.equal(nextRequest.getPrepareFinancialAdmission(), false);
29
+ nextRequest.setPrepareFinancialAdmission(true);
30
+ const oldReader = previous.ResolveGameWalletContextRequest.deserializeBinary(nextRequest.serializeBinary());
31
+ assert.equal(oldReader.getUserId(), 7001);
32
+ assert.equal(oldReader.getWalletCurrency(), 'EUR');
33
+ assert.equal(oldReader.getIncludeBonusBalance(), true);
34
+ const nextReader = current.ResolveGameWalletContextRequest.deserializeBinary(oldRequest.serializeBinary());
35
+ assert.equal(nextReader.hasPrepareFinancialAdmission(), false);
36
+
37
+ const response = (bindings) => {
38
+ const value = new bindings.ResolveGameWalletContextResponse();
39
+ value.setUserId(7001); value.setWalletCurrency('EUR'); value.setCurrencyScale(2);
40
+ value.setBalanceMinor('9007199254740993'); value.setBalanceMajor('90071992547409.93');
41
+ value.setBonusBalanceMinor('30');
42
+ return value;
43
+ };
44
+ const oldResponse = response(previous);
45
+ const nextResponse = response(current);
46
+ assert.deepEqual(Buffer.from(nextResponse.serializeBinary()), Buffer.from(oldResponse.serializeBinary()));
47
+ assert.equal(nextResponse.hasFinancialAdmission(), false);
48
+ const context = new current.FinancialAdmissionWalletContext();
49
+ context.setProtocolVersion(1);
50
+ context.setWalletReference('fixture-wallet-reference');
51
+ context.setOwnershipEpoch('fixture-payment-epoch');
52
+ context.setAdmissionVersion('18446744073709551615');
53
+ context.setCashLedgerEntryId('9007199254740993');
54
+ assert.equal(context.hasBonusLedgerEntryId(), false);
55
+ context.setBonusLedgerEntryId('9007199254740995');
56
+ nextResponse.setFinancialAdmission(context);
57
+ const oldResponseReader = previous.ResolveGameWalletContextResponse.deserializeBinary(nextResponse.serializeBinary());
58
+ assert.equal(oldResponseReader.getBalanceMinor(), '9007199254740993');
59
+ assert.equal(oldResponseReader.getBalanceMajor(), '90071992547409.93');
60
+ assert.equal(oldResponseReader.getBonusBalanceMinor(), '30');
61
+ const decoded = current.ResolveGameWalletContextResponse.deserializeBinary(nextResponse.serializeBinary()).getFinancialAdmission();
62
+ assert.equal(decoded.getCashLedgerEntryId(), '9007199254740993');
63
+ assert.equal(decoded.getBonusLedgerEntryId(), '9007199254740995');
64
+ assert.equal(decoded.getAdmissionVersion(), '18446744073709551615');
65
+ assert.equal(current.ResolveGameWalletContextResponse.deserializeBinary(oldResponse.serializeBinary()).hasFinancialAdmission(), false);
66
+ console.log('PASS additive admission protobuf: legacy byte equality, old/new readers, absent opt-in/context, exact ledger/version strings above MAX_SAFE_INTEGER; no RPC/field/type removed');