protobuf-platform 1.2.617 → 1.2.622

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.
@@ -0,0 +1,76 @@
1
+ # Promotional Big Wins contract
2
+
3
+ Release: `protobuf-platform@1.2.620`.
4
+
5
+ ## Public feed
6
+
7
+ `bet.Bet/getPromotionalBigWins(PaginationRequest) -> WinRatesResponse` is a separate
8
+ simulated promotional feed. Gateway selects this method only when promotional
9
+ mode is explicitly requested. The requesting UI must visibly disclose that the
10
+ cards are simulated promotional examples, not genuine player activity.
11
+
12
+ Only `limit` and `offset` are used. Offset follows the existing Big Wins convention:
13
+ a zero-based page number, with the row start calculated as `offset * limit`.
14
+ The shared request's user/history filters do not apply to this method.
15
+
16
+ `getWinRates`, `getLastWins`, `getTopWinByMultiplier`, `PaginationRequest`,
17
+ `WinRatesResponse`, and `WinRateItem` retain their existing fields and semantics.
18
+ There is no response disclosure flag, player ID, or financial operation in the
19
+ new contract. The public amount retains its existing protobuf `float` type.
20
+ Implementations must account for wire rounding when enforcing generated ranges;
21
+ configuration decimal strings must never be converted to floats for storage.
22
+
23
+ ## Configuration management
24
+
25
+ These methods are internal and must be exposed only through the gateway's
26
+ authenticated, authorized BackOffice path. They manage bet-service configuration,
27
+ never real bets, users, wallets, or ledger entries.
28
+
29
+ | RPC | Request | Response |
30
+ | --- | --- | --- |
31
+ | `readListPromotionalBigWins` | `PaginationRequest` | `PromotionalBigWinItemsResponse` |
32
+ | `setPromotionalBigWin` | `PromotionalBigWinRequest` | `PromotionalBigWinItem` |
33
+ | `deletePromotionalBigWin` | `PromotionalBigWinKey` | `PromotionalBigWinStatusResponse` |
34
+
35
+ The list includes active and inactive configurations and uses the same page-offset
36
+ convention. Set is a full create-or-replace operation keyed by canonical game ID.
37
+ It requires positive `game_id`, positive integer `frequency`, exact non-negative
38
+ decimal `min_win` and `max_win` with `max_win >= min_win`, and explicit `is_active`.
39
+ The optional boolean preserves absent versus explicitly false on the wire; the
40
+ service must reject absence. Setting false disables selection. Delete is
41
+ idempotent: absence is successful.
42
+
43
+ Amounts are in the authoritative runtime BaseCurrency, with the platform currency
44
+ scale and implementation range validation. They do not encode a fixed currency.
45
+ Frequency is a selection weight, not a count or quota. Timestamps in returned
46
+ configuration items are service-generated ISO timestamps.
47
+
48
+ ## Game authority and seed resolution
49
+
50
+ Existing `game.Game/getProviderCatalogBatch` and `getGameCatalogBatch` expose
51
+ canonical IDs, titles, slugs, provider associations, and availability flags.
52
+ `getGamesByIds` provides card metadata. No game contract change is required.
53
+ Runtime validation must consider game/provider availability: the existing poor
54
+ metadata lookup excludes deactivated content but alone does not check all active
55
+ and hidden flags.
56
+
57
+ Seed matching must join provider identity and game title/slug conservatively,
58
+ report missing/ambiguous matches, and store only resolved game IDs. Invalid source
59
+ rows and conflicting duplicate configurations must be reported and skipped rather
60
+ than defaulted or overwritten according to spreadsheet order.
61
+
62
+ ## Compatibility and rollout
63
+
64
+ This release only adds RPCs and messages. Older clients can call existing methods
65
+ on upgraded servers unchanged. New promotional methods are unavailable on older
66
+ bet servers; gateway must never fall back to genuine wins for a promotional request.
67
+
68
+ Publish the prepared package manually, then verify registry resolution and update
69
+ bet/gateway package locks before their implementation. Deploy the bet migration
70
+ and server support before enabling the gateway selector. The game service must
71
+ already expose the existing catalog and metadata methods. Frontend disclosure
72
+ must be present before promotional mode is exposed to users.
73
+
74
+ On rollback, disable promotional routing before rolling back bet support. Keep
75
+ configuration data unless a separately reviewed migration rollback is intended.
76
+ Package publication alone neither deploys the feature nor runs a migration/seed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.617",
3
+ "version": "1.2.622",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -622,8 +622,8 @@ message GetUserWalletBalancesRequest {
622
622
  message UserWalletBalanceItem {
623
623
  string currency = 1;
624
624
  int32 currency_scale = 2;
625
- int64 real_amount_minor = 3;
626
- int64 bonus_amount_minor = 4;
625
+ int64 real_amount_minor = 3 [jstype = JS_STRING];
626
+ int64 bonus_amount_minor = 4 [jstype = JS_STRING];
627
627
  optional string updated_at = 5;
628
628
  }
629
629
  message UserWalletBalancesResponse {
package/user/user_pb.js CHANGED
@@ -24621,8 +24621,8 @@ proto.user.UserWalletBalanceItem.toObject = function(includeInstance, msg) {
24621
24621
  var f, obj = {
24622
24622
  currency: jspb.Message.getFieldWithDefault(msg, 1, ""),
24623
24623
  currencyScale: jspb.Message.getFieldWithDefault(msg, 2, 0),
24624
- realAmountMinor: jspb.Message.getFieldWithDefault(msg, 3, 0),
24625
- bonusAmountMinor: jspb.Message.getFieldWithDefault(msg, 4, 0),
24624
+ realAmountMinor: jspb.Message.getFieldWithDefault(msg, 3, "0"),
24625
+ bonusAmountMinor: jspb.Message.getFieldWithDefault(msg, 4, "0"),
24626
24626
  updatedAt: jspb.Message.getFieldWithDefault(msg, 5, "")
24627
24627
  };
24628
24628
 
@@ -24669,11 +24669,11 @@ proto.user.UserWalletBalanceItem.deserializeBinaryFromReader = function(msg, rea
24669
24669
  msg.setCurrencyScale(value);
24670
24670
  break;
24671
24671
  case 3:
24672
- var value = /** @type {number} */ (reader.readInt64());
24672
+ var value = /** @type {string} */ (reader.readInt64String());
24673
24673
  msg.setRealAmountMinor(value);
24674
24674
  break;
24675
24675
  case 4:
24676
- var value = /** @type {number} */ (reader.readInt64());
24676
+ var value = /** @type {string} */ (reader.readInt64String());
24677
24677
  msg.setBonusAmountMinor(value);
24678
24678
  break;
24679
24679
  case 5:
@@ -24724,15 +24724,15 @@ proto.user.UserWalletBalanceItem.serializeBinaryToWriter = function(message, wri
24724
24724
  );
24725
24725
  }
24726
24726
  f = message.getRealAmountMinor();
24727
- if (f !== 0) {
24728
- writer.writeInt64(
24727
+ if (parseInt(f, 10) !== 0) {
24728
+ writer.writeInt64String(
24729
24729
  3,
24730
24730
  f
24731
24731
  );
24732
24732
  }
24733
24733
  f = message.getBonusAmountMinor();
24734
- if (f !== 0) {
24735
- writer.writeInt64(
24734
+ if (parseInt(f, 10) !== 0) {
24735
+ writer.writeInt64String(
24736
24736
  4,
24737
24737
  f
24738
24738
  );
@@ -24785,37 +24785,37 @@ proto.user.UserWalletBalanceItem.prototype.setCurrencyScale = function(value) {
24785
24785
 
24786
24786
  /**
24787
24787
  * optional int64 real_amount_minor = 3;
24788
- * @return {number}
24788
+ * @return {string}
24789
24789
  */
24790
24790
  proto.user.UserWalletBalanceItem.prototype.getRealAmountMinor = function() {
24791
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
24791
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0"));
24792
24792
  };
24793
24793
 
24794
24794
 
24795
24795
  /**
24796
- * @param {number} value
24796
+ * @param {string} value
24797
24797
  * @return {!proto.user.UserWalletBalanceItem} returns this
24798
24798
  */
24799
24799
  proto.user.UserWalletBalanceItem.prototype.setRealAmountMinor = function(value) {
24800
- return jspb.Message.setProto3IntField(this, 3, value);
24800
+ return jspb.Message.setProto3StringIntField(this, 3, value);
24801
24801
  };
24802
24802
 
24803
24803
 
24804
24804
  /**
24805
24805
  * optional int64 bonus_amount_minor = 4;
24806
- * @return {number}
24806
+ * @return {string}
24807
24807
  */
24808
24808
  proto.user.UserWalletBalanceItem.prototype.getBonusAmountMinor = function() {
24809
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
24809
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0"));
24810
24810
  };
24811
24811
 
24812
24812
 
24813
24813
  /**
24814
- * @param {number} value
24814
+ * @param {string} value
24815
24815
  * @return {!proto.user.UserWalletBalanceItem} returns this
24816
24816
  */
24817
24817
  proto.user.UserWalletBalanceItem.prototype.setBonusAmountMinor = function(value) {
24818
- return jspb.Message.setProto3IntField(this, 4, value);
24818
+ return jspb.Message.setProto3StringIntField(this, 4, value);
24819
24819
  };
24820
24820
 
24821
24821