protobuf-platform 1.2.685 → 1.2.687
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/docs/loyalty-level-up-reward-v1.md +7 -0
- package/loyalty/loyalty.proto +2 -0
- package/loyalty/loyalty_pb.js +51 -2
- package/package.json +1 -1
- package/user/user.proto +2 -0
- package/user/user_pb.js +49 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Explicit Loyalty completion reward V1
|
|
2
|
+
|
|
3
|
+
A Loyalty level has one optional `total_level_up_currency` beside the existing exact string `total_level_up_amount`. Missing currency cannot create monetary rewards. `LevelItemsResponse.reward_currencies` carries the effective startup-loaded whitelist to BackOffice. Existing field tags and reward types remain unchanged; there is no special current-wallet selector.
|
|
4
|
+
|
|
5
|
+
Payment's `grantLoyaltyLevelUpReward` accepts independent `reward_identity`, `user_id`, exact decimal `amount` and explicit `currency`. Payment owns settlement and returns operation/ledger IDs, settled currency/scale/minor amount and replay status. Multiple future grants can use separate identities without exposing Loyalty database structure in Payment.
|
|
6
|
+
|
|
7
|
+
Release 1.2.686 contains the monetary grant, all additive currency fields and the level-list whitelist. Deploy the Payment receiver before Loyalty producers, then Gateway and BackOffice. Source and database integration do not prove deployed staging acceptance.
|
package/loyalty/loyalty.proto
CHANGED
|
@@ -191,6 +191,8 @@ message LevelItemsResponse {
|
|
|
191
191
|
repeated LevelItem items = 1;
|
|
192
192
|
optional int32 total_pages = 2;
|
|
193
193
|
optional int32 total_items = 3;
|
|
194
|
+
// Effective startup-loaded whitelist for the BackOffice level form.
|
|
195
|
+
repeated string reward_currencies = 4;
|
|
194
196
|
}
|
|
195
197
|
message LevelStatusResponse {
|
|
196
198
|
string status = 1;
|
package/loyalty/loyalty_pb.js
CHANGED
|
@@ -8534,7 +8534,7 @@ proto.loyalty.LevelResponse.prototype.hasData = function() {
|
|
|
8534
8534
|
* @private {!Array<number>}
|
|
8535
8535
|
* @const
|
|
8536
8536
|
*/
|
|
8537
|
-
proto.loyalty.LevelItemsResponse.repeatedFields_ = [1];
|
|
8537
|
+
proto.loyalty.LevelItemsResponse.repeatedFields_ = [1,4];
|
|
8538
8538
|
|
|
8539
8539
|
|
|
8540
8540
|
|
|
@@ -8570,7 +8570,8 @@ proto.loyalty.LevelItemsResponse.toObject = function(includeInstance, msg) {
|
|
|
8570
8570
|
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
|
8571
8571
|
proto.loyalty.LevelItem.toObject, includeInstance),
|
|
8572
8572
|
totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
8573
|
-
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
8573
|
+
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
8574
|
+
rewardCurrenciesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
|
|
8574
8575
|
};
|
|
8575
8576
|
|
|
8576
8577
|
if (includeInstance) {
|
|
@@ -8620,6 +8621,10 @@ proto.loyalty.LevelItemsResponse.deserializeBinaryFromReader = function(msg, rea
|
|
|
8620
8621
|
var value = /** @type {number} */ (reader.readInt32());
|
|
8621
8622
|
msg.setTotalItems(value);
|
|
8622
8623
|
break;
|
|
8624
|
+
case 4:
|
|
8625
|
+
var value = /** @type {string} */ (reader.readString());
|
|
8626
|
+
msg.addRewardCurrencies(value);
|
|
8627
|
+
break;
|
|
8623
8628
|
default:
|
|
8624
8629
|
reader.skipField();
|
|
8625
8630
|
break;
|
|
@@ -8671,6 +8676,13 @@ proto.loyalty.LevelItemsResponse.serializeBinaryToWriter = function(message, wri
|
|
|
8671
8676
|
f
|
|
8672
8677
|
);
|
|
8673
8678
|
}
|
|
8679
|
+
f = message.getRewardCurrenciesList();
|
|
8680
|
+
if (f.length > 0) {
|
|
8681
|
+
writer.writeRepeatedString(
|
|
8682
|
+
4,
|
|
8683
|
+
f
|
|
8684
|
+
);
|
|
8685
|
+
}
|
|
8674
8686
|
};
|
|
8675
8687
|
|
|
8676
8688
|
|
|
@@ -8784,6 +8796,43 @@ proto.loyalty.LevelItemsResponse.prototype.hasTotalItems = function() {
|
|
|
8784
8796
|
};
|
|
8785
8797
|
|
|
8786
8798
|
|
|
8799
|
+
/**
|
|
8800
|
+
* repeated string reward_currencies = 4;
|
|
8801
|
+
* @return {!Array<string>}
|
|
8802
|
+
*/
|
|
8803
|
+
proto.loyalty.LevelItemsResponse.prototype.getRewardCurrenciesList = function() {
|
|
8804
|
+
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
|
|
8805
|
+
};
|
|
8806
|
+
|
|
8807
|
+
|
|
8808
|
+
/**
|
|
8809
|
+
* @param {!Array<string>} value
|
|
8810
|
+
* @return {!proto.loyalty.LevelItemsResponse} returns this
|
|
8811
|
+
*/
|
|
8812
|
+
proto.loyalty.LevelItemsResponse.prototype.setRewardCurrenciesList = function(value) {
|
|
8813
|
+
return jspb.Message.setField(this, 4, value || []);
|
|
8814
|
+
};
|
|
8815
|
+
|
|
8816
|
+
|
|
8817
|
+
/**
|
|
8818
|
+
* @param {string} value
|
|
8819
|
+
* @param {number=} opt_index
|
|
8820
|
+
* @return {!proto.loyalty.LevelItemsResponse} returns this
|
|
8821
|
+
*/
|
|
8822
|
+
proto.loyalty.LevelItemsResponse.prototype.addRewardCurrencies = function(value, opt_index) {
|
|
8823
|
+
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
|
|
8824
|
+
};
|
|
8825
|
+
|
|
8826
|
+
|
|
8827
|
+
/**
|
|
8828
|
+
* Clears the list making it empty but non-null.
|
|
8829
|
+
* @return {!proto.loyalty.LevelItemsResponse} returns this
|
|
8830
|
+
*/
|
|
8831
|
+
proto.loyalty.LevelItemsResponse.prototype.clearRewardCurrenciesList = function() {
|
|
8832
|
+
return this.setRewardCurrenciesList([]);
|
|
8833
|
+
};
|
|
8834
|
+
|
|
8835
|
+
|
|
8787
8836
|
|
|
8788
8837
|
|
|
8789
8838
|
|
package/package.json
CHANGED
package/user/user.proto
CHANGED
|
@@ -300,6 +300,8 @@ message RegistrationRequest {
|
|
|
300
300
|
// Gateway IP-derived country; distinct from profile country.
|
|
301
301
|
optional string ip_country = 28;
|
|
302
302
|
optional int32 bonus_id = 29;
|
|
303
|
+
// Explicit signup refusal; absence preserves automatic unique-candidate selection.
|
|
304
|
+
optional bool no_bonus = 30;
|
|
303
305
|
}
|
|
304
306
|
message LoggedInResponse {
|
|
305
307
|
int32 id = 1;
|
package/user/user_pb.js
CHANGED
|
@@ -9350,7 +9350,8 @@ proto.user.RegistrationRequest.toObject = function(includeInstance, msg) {
|
|
|
9350
9350
|
antifraudSession: jspb.Message.getFieldWithDefault(msg, 26, ""),
|
|
9351
9351
|
fraudneticToken: jspb.Message.getFieldWithDefault(msg, 27, ""),
|
|
9352
9352
|
ipCountry: jspb.Message.getFieldWithDefault(msg, 28, ""),
|
|
9353
|
-
bonusId: jspb.Message.getFieldWithDefault(msg, 29, 0)
|
|
9353
|
+
bonusId: jspb.Message.getFieldWithDefault(msg, 29, 0),
|
|
9354
|
+
noBonus: jspb.Message.getBooleanFieldWithDefault(msg, 30, false)
|
|
9354
9355
|
};
|
|
9355
9356
|
|
|
9356
9357
|
if (includeInstance) {
|
|
@@ -9503,6 +9504,10 @@ proto.user.RegistrationRequest.deserializeBinaryFromReader = function(msg, reade
|
|
|
9503
9504
|
var value = /** @type {number} */ (reader.readInt32());
|
|
9504
9505
|
msg.setBonusId(value);
|
|
9505
9506
|
break;
|
|
9507
|
+
case 30:
|
|
9508
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
9509
|
+
msg.setNoBonus(value);
|
|
9510
|
+
break;
|
|
9506
9511
|
default:
|
|
9507
9512
|
reader.skipField();
|
|
9508
9513
|
break;
|
|
@@ -9735,6 +9740,13 @@ proto.user.RegistrationRequest.serializeBinaryToWriter = function(message, write
|
|
|
9735
9740
|
f
|
|
9736
9741
|
);
|
|
9737
9742
|
}
|
|
9743
|
+
f = /** @type {boolean} */ (jspb.Message.getField(message, 30));
|
|
9744
|
+
if (f != null) {
|
|
9745
|
+
writer.writeBool(
|
|
9746
|
+
30,
|
|
9747
|
+
f
|
|
9748
|
+
);
|
|
9749
|
+
}
|
|
9738
9750
|
};
|
|
9739
9751
|
|
|
9740
9752
|
|
|
@@ -10728,6 +10740,42 @@ proto.user.RegistrationRequest.prototype.hasBonusId = function() {
|
|
|
10728
10740
|
};
|
|
10729
10741
|
|
|
10730
10742
|
|
|
10743
|
+
/**
|
|
10744
|
+
* optional bool no_bonus = 30;
|
|
10745
|
+
* @return {boolean}
|
|
10746
|
+
*/
|
|
10747
|
+
proto.user.RegistrationRequest.prototype.getNoBonus = function() {
|
|
10748
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 30, false));
|
|
10749
|
+
};
|
|
10750
|
+
|
|
10751
|
+
|
|
10752
|
+
/**
|
|
10753
|
+
* @param {boolean} value
|
|
10754
|
+
* @return {!proto.user.RegistrationRequest} returns this
|
|
10755
|
+
*/
|
|
10756
|
+
proto.user.RegistrationRequest.prototype.setNoBonus = function(value) {
|
|
10757
|
+
return jspb.Message.setField(this, 30, value);
|
|
10758
|
+
};
|
|
10759
|
+
|
|
10760
|
+
|
|
10761
|
+
/**
|
|
10762
|
+
* Clears the field making it undefined.
|
|
10763
|
+
* @return {!proto.user.RegistrationRequest} returns this
|
|
10764
|
+
*/
|
|
10765
|
+
proto.user.RegistrationRequest.prototype.clearNoBonus = function() {
|
|
10766
|
+
return jspb.Message.setField(this, 30, undefined);
|
|
10767
|
+
};
|
|
10768
|
+
|
|
10769
|
+
|
|
10770
|
+
/**
|
|
10771
|
+
* Returns whether this field is set.
|
|
10772
|
+
* @return {boolean}
|
|
10773
|
+
*/
|
|
10774
|
+
proto.user.RegistrationRequest.prototype.hasNoBonus = function() {
|
|
10775
|
+
return jspb.Message.getField(this, 30) != null;
|
|
10776
|
+
};
|
|
10777
|
+
|
|
10778
|
+
|
|
10731
10779
|
|
|
10732
10780
|
|
|
10733
10781
|
|