protobuf-platform 1.2.641 → 1.2.642
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/cashback/cashback.proto +11 -0
- package/cashback/cashback_grpc_pb.js +33 -0
- package/cashback/cashback_pb.js +424 -0
- package/loyalty/loyalty.proto +25 -0
- package/loyalty/loyalty_grpc_pb.js +22 -0
- package/loyalty/loyalty_pb.js +1173 -2
- package/package.json +1 -1
- package/user/user.proto +12 -0
- package/user/user_grpc_pb.js +33 -0
- package/user/user_pb.js +454 -0
package/cashback/cashback.proto
CHANGED
|
@@ -19,6 +19,7 @@ service Cashback {
|
|
|
19
19
|
rpc getUserCashbackByType(CashbackUserRequest) returns (UserCashbackResponse);
|
|
20
20
|
rpc claimCashbackForUser(ClaimCashbackRequest) returns (ClaimCashbackResponse);
|
|
21
21
|
rpc reactivateCashbackForUser(ReactivateCashbackRequest) returns (UserCashbackResponse);
|
|
22
|
+
rpc activateCashbackForUser(ActivateCashbackForUserRequest) returns (ActivateCashbackForUserResponse);
|
|
22
23
|
rpc getUserCashbackInformation(GetUserCashbackInformationRequest) returns (GetUserCashbackInformationResponse);
|
|
23
24
|
}
|
|
24
25
|
//Technical
|
|
@@ -179,6 +180,16 @@ message ReactivateCashbackRequest {
|
|
|
179
180
|
string cashback_type = 2;
|
|
180
181
|
optional string currency = 3;
|
|
181
182
|
}
|
|
183
|
+
message ActivateCashbackForUserRequest {
|
|
184
|
+
int32 user_id = 1;
|
|
185
|
+
int32 cashback_id = 2;
|
|
186
|
+
string grant_source = 3;
|
|
187
|
+
string grant_id = 4;
|
|
188
|
+
}
|
|
189
|
+
message ActivateCashbackForUserResponse {
|
|
190
|
+
int32 cashback_user_id = 1;
|
|
191
|
+
string status = 2;
|
|
192
|
+
}
|
|
182
193
|
message ClaimCashbackResponse {
|
|
183
194
|
string status = 1;
|
|
184
195
|
optional int32 user_bonus_id = 2;
|
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
var grpc = require('@grpc/grpc-js');
|
|
5
5
|
var cashback_pb = require('./cashback_pb.js');
|
|
6
6
|
|
|
7
|
+
function serialize_cashback_ActivateCashbackForUserRequest(arg) {
|
|
8
|
+
if (!(arg instanceof cashback_pb.ActivateCashbackForUserRequest)) {
|
|
9
|
+
throw new Error('Expected argument of type cashback.ActivateCashbackForUserRequest');
|
|
10
|
+
}
|
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function deserialize_cashback_ActivateCashbackForUserRequest(buffer_arg) {
|
|
15
|
+
return cashback_pb.ActivateCashbackForUserRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function serialize_cashback_ActivateCashbackForUserResponse(arg) {
|
|
19
|
+
if (!(arg instanceof cashback_pb.ActivateCashbackForUserResponse)) {
|
|
20
|
+
throw new Error('Expected argument of type cashback.ActivateCashbackForUserResponse');
|
|
21
|
+
}
|
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function deserialize_cashback_ActivateCashbackForUserResponse(buffer_arg) {
|
|
26
|
+
return cashback_pb.ActivateCashbackForUserResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
27
|
+
}
|
|
28
|
+
|
|
7
29
|
function serialize_cashback_CashbackConfigItem(arg) {
|
|
8
30
|
if (!(arg instanceof cashback_pb.CashbackConfigItem)) {
|
|
9
31
|
throw new Error('Expected argument of type cashback.CashbackConfigItem');
|
|
@@ -393,6 +415,17 @@ getCashbackForUserByType: {
|
|
|
393
415
|
responseSerialize: serialize_cashback_UserCashbackResponse,
|
|
394
416
|
responseDeserialize: deserialize_cashback_UserCashbackResponse,
|
|
395
417
|
},
|
|
418
|
+
activateCashbackForUser: {
|
|
419
|
+
path: '/cashback.Cashback/activateCashbackForUser',
|
|
420
|
+
requestStream: false,
|
|
421
|
+
responseStream: false,
|
|
422
|
+
requestType: cashback_pb.ActivateCashbackForUserRequest,
|
|
423
|
+
responseType: cashback_pb.ActivateCashbackForUserResponse,
|
|
424
|
+
requestSerialize: serialize_cashback_ActivateCashbackForUserRequest,
|
|
425
|
+
requestDeserialize: deserialize_cashback_ActivateCashbackForUserRequest,
|
|
426
|
+
responseSerialize: serialize_cashback_ActivateCashbackForUserResponse,
|
|
427
|
+
responseDeserialize: deserialize_cashback_ActivateCashbackForUserResponse,
|
|
428
|
+
},
|
|
396
429
|
getUserCashbackInformation: {
|
|
397
430
|
path: '/cashback.Cashback/getUserCashbackInformation',
|
|
398
431
|
requestStream: false,
|
package/cashback/cashback_pb.js
CHANGED
|
@@ -21,6 +21,8 @@ var global = (function() {
|
|
|
21
21
|
return Function('return this')();
|
|
22
22
|
}.call(null));
|
|
23
23
|
|
|
24
|
+
goog.exportSymbol('proto.cashback.ActivateCashbackForUserRequest', null, global);
|
|
25
|
+
goog.exportSymbol('proto.cashback.ActivateCashbackForUserResponse', null, global);
|
|
24
26
|
goog.exportSymbol('proto.cashback.CashbackActions', null, global);
|
|
25
27
|
goog.exportSymbol('proto.cashback.CashbackConfigItem', null, global);
|
|
26
28
|
goog.exportSymbol('proto.cashback.CashbackConfigRequest', null, global);
|
|
@@ -556,6 +558,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
556
558
|
*/
|
|
557
559
|
proto.cashback.ReactivateCashbackRequest.displayName = 'proto.cashback.ReactivateCashbackRequest';
|
|
558
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Generated by JsPbCodeGenerator.
|
|
563
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
564
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
565
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
566
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
567
|
+
* valid.
|
|
568
|
+
* @extends {jspb.Message}
|
|
569
|
+
* @constructor
|
|
570
|
+
*/
|
|
571
|
+
proto.cashback.ActivateCashbackForUserRequest = function(opt_data) {
|
|
572
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
573
|
+
};
|
|
574
|
+
goog.inherits(proto.cashback.ActivateCashbackForUserRequest, jspb.Message);
|
|
575
|
+
if (goog.DEBUG && !COMPILED) {
|
|
576
|
+
/**
|
|
577
|
+
* @public
|
|
578
|
+
* @override
|
|
579
|
+
*/
|
|
580
|
+
proto.cashback.ActivateCashbackForUserRequest.displayName = 'proto.cashback.ActivateCashbackForUserRequest';
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Generated by JsPbCodeGenerator.
|
|
584
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
585
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
586
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
587
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
588
|
+
* valid.
|
|
589
|
+
* @extends {jspb.Message}
|
|
590
|
+
* @constructor
|
|
591
|
+
*/
|
|
592
|
+
proto.cashback.ActivateCashbackForUserResponse = function(opt_data) {
|
|
593
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
594
|
+
};
|
|
595
|
+
goog.inherits(proto.cashback.ActivateCashbackForUserResponse, jspb.Message);
|
|
596
|
+
if (goog.DEBUG && !COMPILED) {
|
|
597
|
+
/**
|
|
598
|
+
* @public
|
|
599
|
+
* @override
|
|
600
|
+
*/
|
|
601
|
+
proto.cashback.ActivateCashbackForUserResponse.displayName = 'proto.cashback.ActivateCashbackForUserResponse';
|
|
602
|
+
}
|
|
559
603
|
/**
|
|
560
604
|
* Generated by JsPbCodeGenerator.
|
|
561
605
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -7917,6 +7961,386 @@ proto.cashback.ReactivateCashbackRequest.prototype.hasCurrency = function() {
|
|
|
7917
7961
|
|
|
7918
7962
|
|
|
7919
7963
|
|
|
7964
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
7965
|
+
/**
|
|
7966
|
+
* Creates an object representation of this proto.
|
|
7967
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
7968
|
+
* Optional fields that are not set will be set to undefined.
|
|
7969
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
7970
|
+
* For the list of reserved names please see:
|
|
7971
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
7972
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
7973
|
+
* JSPB instance for transitional soy proto support:
|
|
7974
|
+
* http://goto/soy-param-migration
|
|
7975
|
+
* @return {!Object}
|
|
7976
|
+
*/
|
|
7977
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.toObject = function(opt_includeInstance) {
|
|
7978
|
+
return proto.cashback.ActivateCashbackForUserRequest.toObject(opt_includeInstance, this);
|
|
7979
|
+
};
|
|
7980
|
+
|
|
7981
|
+
|
|
7982
|
+
/**
|
|
7983
|
+
* Static version of the {@see toObject} method.
|
|
7984
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
7985
|
+
* the JSPB instance for transitional soy proto support:
|
|
7986
|
+
* http://goto/soy-param-migration
|
|
7987
|
+
* @param {!proto.cashback.ActivateCashbackForUserRequest} msg The msg instance to transform.
|
|
7988
|
+
* @return {!Object}
|
|
7989
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
7990
|
+
*/
|
|
7991
|
+
proto.cashback.ActivateCashbackForUserRequest.toObject = function(includeInstance, msg) {
|
|
7992
|
+
var f, obj = {
|
|
7993
|
+
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
7994
|
+
cashbackId: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
7995
|
+
grantSource: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
7996
|
+
grantId: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
7997
|
+
};
|
|
7998
|
+
|
|
7999
|
+
if (includeInstance) {
|
|
8000
|
+
obj.$jspbMessageInstance = msg;
|
|
8001
|
+
}
|
|
8002
|
+
return obj;
|
|
8003
|
+
};
|
|
8004
|
+
}
|
|
8005
|
+
|
|
8006
|
+
|
|
8007
|
+
/**
|
|
8008
|
+
* Deserializes binary data (in protobuf wire format).
|
|
8009
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
8010
|
+
* @return {!proto.cashback.ActivateCashbackForUserRequest}
|
|
8011
|
+
*/
|
|
8012
|
+
proto.cashback.ActivateCashbackForUserRequest.deserializeBinary = function(bytes) {
|
|
8013
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
8014
|
+
var msg = new proto.cashback.ActivateCashbackForUserRequest;
|
|
8015
|
+
return proto.cashback.ActivateCashbackForUserRequest.deserializeBinaryFromReader(msg, reader);
|
|
8016
|
+
};
|
|
8017
|
+
|
|
8018
|
+
|
|
8019
|
+
/**
|
|
8020
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
8021
|
+
* given reader into the given message object.
|
|
8022
|
+
* @param {!proto.cashback.ActivateCashbackForUserRequest} msg The message object to deserialize into.
|
|
8023
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
8024
|
+
* @return {!proto.cashback.ActivateCashbackForUserRequest}
|
|
8025
|
+
*/
|
|
8026
|
+
proto.cashback.ActivateCashbackForUserRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
8027
|
+
while (reader.nextField()) {
|
|
8028
|
+
if (reader.isEndGroup()) {
|
|
8029
|
+
break;
|
|
8030
|
+
}
|
|
8031
|
+
var field = reader.getFieldNumber();
|
|
8032
|
+
switch (field) {
|
|
8033
|
+
case 1:
|
|
8034
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
8035
|
+
msg.setUserId(value);
|
|
8036
|
+
break;
|
|
8037
|
+
case 2:
|
|
8038
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
8039
|
+
msg.setCashbackId(value);
|
|
8040
|
+
break;
|
|
8041
|
+
case 3:
|
|
8042
|
+
var value = /** @type {string} */ (reader.readString());
|
|
8043
|
+
msg.setGrantSource(value);
|
|
8044
|
+
break;
|
|
8045
|
+
case 4:
|
|
8046
|
+
var value = /** @type {string} */ (reader.readString());
|
|
8047
|
+
msg.setGrantId(value);
|
|
8048
|
+
break;
|
|
8049
|
+
default:
|
|
8050
|
+
reader.skipField();
|
|
8051
|
+
break;
|
|
8052
|
+
}
|
|
8053
|
+
}
|
|
8054
|
+
return msg;
|
|
8055
|
+
};
|
|
8056
|
+
|
|
8057
|
+
|
|
8058
|
+
/**
|
|
8059
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
8060
|
+
* @return {!Uint8Array}
|
|
8061
|
+
*/
|
|
8062
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.serializeBinary = function() {
|
|
8063
|
+
var writer = new jspb.BinaryWriter();
|
|
8064
|
+
proto.cashback.ActivateCashbackForUserRequest.serializeBinaryToWriter(this, writer);
|
|
8065
|
+
return writer.getResultBuffer();
|
|
8066
|
+
};
|
|
8067
|
+
|
|
8068
|
+
|
|
8069
|
+
/**
|
|
8070
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
8071
|
+
* format), writing to the given BinaryWriter.
|
|
8072
|
+
* @param {!proto.cashback.ActivateCashbackForUserRequest} message
|
|
8073
|
+
* @param {!jspb.BinaryWriter} writer
|
|
8074
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8075
|
+
*/
|
|
8076
|
+
proto.cashback.ActivateCashbackForUserRequest.serializeBinaryToWriter = function(message, writer) {
|
|
8077
|
+
var f = undefined;
|
|
8078
|
+
f = message.getUserId();
|
|
8079
|
+
if (f !== 0) {
|
|
8080
|
+
writer.writeInt32(
|
|
8081
|
+
1,
|
|
8082
|
+
f
|
|
8083
|
+
);
|
|
8084
|
+
}
|
|
8085
|
+
f = message.getCashbackId();
|
|
8086
|
+
if (f !== 0) {
|
|
8087
|
+
writer.writeInt32(
|
|
8088
|
+
2,
|
|
8089
|
+
f
|
|
8090
|
+
);
|
|
8091
|
+
}
|
|
8092
|
+
f = message.getGrantSource();
|
|
8093
|
+
if (f.length > 0) {
|
|
8094
|
+
writer.writeString(
|
|
8095
|
+
3,
|
|
8096
|
+
f
|
|
8097
|
+
);
|
|
8098
|
+
}
|
|
8099
|
+
f = message.getGrantId();
|
|
8100
|
+
if (f.length > 0) {
|
|
8101
|
+
writer.writeString(
|
|
8102
|
+
4,
|
|
8103
|
+
f
|
|
8104
|
+
);
|
|
8105
|
+
}
|
|
8106
|
+
};
|
|
8107
|
+
|
|
8108
|
+
|
|
8109
|
+
/**
|
|
8110
|
+
* optional int32 user_id = 1;
|
|
8111
|
+
* @return {number}
|
|
8112
|
+
*/
|
|
8113
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.getUserId = function() {
|
|
8114
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
8115
|
+
};
|
|
8116
|
+
|
|
8117
|
+
|
|
8118
|
+
/**
|
|
8119
|
+
* @param {number} value
|
|
8120
|
+
* @return {!proto.cashback.ActivateCashbackForUserRequest} returns this
|
|
8121
|
+
*/
|
|
8122
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.setUserId = function(value) {
|
|
8123
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
8124
|
+
};
|
|
8125
|
+
|
|
8126
|
+
|
|
8127
|
+
/**
|
|
8128
|
+
* optional int32 cashback_id = 2;
|
|
8129
|
+
* @return {number}
|
|
8130
|
+
*/
|
|
8131
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.getCashbackId = function() {
|
|
8132
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
8133
|
+
};
|
|
8134
|
+
|
|
8135
|
+
|
|
8136
|
+
/**
|
|
8137
|
+
* @param {number} value
|
|
8138
|
+
* @return {!proto.cashback.ActivateCashbackForUserRequest} returns this
|
|
8139
|
+
*/
|
|
8140
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.setCashbackId = function(value) {
|
|
8141
|
+
return jspb.Message.setProto3IntField(this, 2, value);
|
|
8142
|
+
};
|
|
8143
|
+
|
|
8144
|
+
|
|
8145
|
+
/**
|
|
8146
|
+
* optional string grant_source = 3;
|
|
8147
|
+
* @return {string}
|
|
8148
|
+
*/
|
|
8149
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.getGrantSource = function() {
|
|
8150
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
8151
|
+
};
|
|
8152
|
+
|
|
8153
|
+
|
|
8154
|
+
/**
|
|
8155
|
+
* @param {string} value
|
|
8156
|
+
* @return {!proto.cashback.ActivateCashbackForUserRequest} returns this
|
|
8157
|
+
*/
|
|
8158
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.setGrantSource = function(value) {
|
|
8159
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
|
8160
|
+
};
|
|
8161
|
+
|
|
8162
|
+
|
|
8163
|
+
/**
|
|
8164
|
+
* optional string grant_id = 4;
|
|
8165
|
+
* @return {string}
|
|
8166
|
+
*/
|
|
8167
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.getGrantId = function() {
|
|
8168
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
8169
|
+
};
|
|
8170
|
+
|
|
8171
|
+
|
|
8172
|
+
/**
|
|
8173
|
+
* @param {string} value
|
|
8174
|
+
* @return {!proto.cashback.ActivateCashbackForUserRequest} returns this
|
|
8175
|
+
*/
|
|
8176
|
+
proto.cashback.ActivateCashbackForUserRequest.prototype.setGrantId = function(value) {
|
|
8177
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
8178
|
+
};
|
|
8179
|
+
|
|
8180
|
+
|
|
8181
|
+
|
|
8182
|
+
|
|
8183
|
+
|
|
8184
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
8185
|
+
/**
|
|
8186
|
+
* Creates an object representation of this proto.
|
|
8187
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
8188
|
+
* Optional fields that are not set will be set to undefined.
|
|
8189
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
8190
|
+
* For the list of reserved names please see:
|
|
8191
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
8192
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
8193
|
+
* JSPB instance for transitional soy proto support:
|
|
8194
|
+
* http://goto/soy-param-migration
|
|
8195
|
+
* @return {!Object}
|
|
8196
|
+
*/
|
|
8197
|
+
proto.cashback.ActivateCashbackForUserResponse.prototype.toObject = function(opt_includeInstance) {
|
|
8198
|
+
return proto.cashback.ActivateCashbackForUserResponse.toObject(opt_includeInstance, this);
|
|
8199
|
+
};
|
|
8200
|
+
|
|
8201
|
+
|
|
8202
|
+
/**
|
|
8203
|
+
* Static version of the {@see toObject} method.
|
|
8204
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
8205
|
+
* the JSPB instance for transitional soy proto support:
|
|
8206
|
+
* http://goto/soy-param-migration
|
|
8207
|
+
* @param {!proto.cashback.ActivateCashbackForUserResponse} msg The msg instance to transform.
|
|
8208
|
+
* @return {!Object}
|
|
8209
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8210
|
+
*/
|
|
8211
|
+
proto.cashback.ActivateCashbackForUserResponse.toObject = function(includeInstance, msg) {
|
|
8212
|
+
var f, obj = {
|
|
8213
|
+
cashbackUserId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
8214
|
+
status: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
8215
|
+
};
|
|
8216
|
+
|
|
8217
|
+
if (includeInstance) {
|
|
8218
|
+
obj.$jspbMessageInstance = msg;
|
|
8219
|
+
}
|
|
8220
|
+
return obj;
|
|
8221
|
+
};
|
|
8222
|
+
}
|
|
8223
|
+
|
|
8224
|
+
|
|
8225
|
+
/**
|
|
8226
|
+
* Deserializes binary data (in protobuf wire format).
|
|
8227
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
8228
|
+
* @return {!proto.cashback.ActivateCashbackForUserResponse}
|
|
8229
|
+
*/
|
|
8230
|
+
proto.cashback.ActivateCashbackForUserResponse.deserializeBinary = function(bytes) {
|
|
8231
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
8232
|
+
var msg = new proto.cashback.ActivateCashbackForUserResponse;
|
|
8233
|
+
return proto.cashback.ActivateCashbackForUserResponse.deserializeBinaryFromReader(msg, reader);
|
|
8234
|
+
};
|
|
8235
|
+
|
|
8236
|
+
|
|
8237
|
+
/**
|
|
8238
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
8239
|
+
* given reader into the given message object.
|
|
8240
|
+
* @param {!proto.cashback.ActivateCashbackForUserResponse} msg The message object to deserialize into.
|
|
8241
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
8242
|
+
* @return {!proto.cashback.ActivateCashbackForUserResponse}
|
|
8243
|
+
*/
|
|
8244
|
+
proto.cashback.ActivateCashbackForUserResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
8245
|
+
while (reader.nextField()) {
|
|
8246
|
+
if (reader.isEndGroup()) {
|
|
8247
|
+
break;
|
|
8248
|
+
}
|
|
8249
|
+
var field = reader.getFieldNumber();
|
|
8250
|
+
switch (field) {
|
|
8251
|
+
case 1:
|
|
8252
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
8253
|
+
msg.setCashbackUserId(value);
|
|
8254
|
+
break;
|
|
8255
|
+
case 2:
|
|
8256
|
+
var value = /** @type {string} */ (reader.readString());
|
|
8257
|
+
msg.setStatus(value);
|
|
8258
|
+
break;
|
|
8259
|
+
default:
|
|
8260
|
+
reader.skipField();
|
|
8261
|
+
break;
|
|
8262
|
+
}
|
|
8263
|
+
}
|
|
8264
|
+
return msg;
|
|
8265
|
+
};
|
|
8266
|
+
|
|
8267
|
+
|
|
8268
|
+
/**
|
|
8269
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
8270
|
+
* @return {!Uint8Array}
|
|
8271
|
+
*/
|
|
8272
|
+
proto.cashback.ActivateCashbackForUserResponse.prototype.serializeBinary = function() {
|
|
8273
|
+
var writer = new jspb.BinaryWriter();
|
|
8274
|
+
proto.cashback.ActivateCashbackForUserResponse.serializeBinaryToWriter(this, writer);
|
|
8275
|
+
return writer.getResultBuffer();
|
|
8276
|
+
};
|
|
8277
|
+
|
|
8278
|
+
|
|
8279
|
+
/**
|
|
8280
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
8281
|
+
* format), writing to the given BinaryWriter.
|
|
8282
|
+
* @param {!proto.cashback.ActivateCashbackForUserResponse} message
|
|
8283
|
+
* @param {!jspb.BinaryWriter} writer
|
|
8284
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
8285
|
+
*/
|
|
8286
|
+
proto.cashback.ActivateCashbackForUserResponse.serializeBinaryToWriter = function(message, writer) {
|
|
8287
|
+
var f = undefined;
|
|
8288
|
+
f = message.getCashbackUserId();
|
|
8289
|
+
if (f !== 0) {
|
|
8290
|
+
writer.writeInt32(
|
|
8291
|
+
1,
|
|
8292
|
+
f
|
|
8293
|
+
);
|
|
8294
|
+
}
|
|
8295
|
+
f = message.getStatus();
|
|
8296
|
+
if (f.length > 0) {
|
|
8297
|
+
writer.writeString(
|
|
8298
|
+
2,
|
|
8299
|
+
f
|
|
8300
|
+
);
|
|
8301
|
+
}
|
|
8302
|
+
};
|
|
8303
|
+
|
|
8304
|
+
|
|
8305
|
+
/**
|
|
8306
|
+
* optional int32 cashback_user_id = 1;
|
|
8307
|
+
* @return {number}
|
|
8308
|
+
*/
|
|
8309
|
+
proto.cashback.ActivateCashbackForUserResponse.prototype.getCashbackUserId = function() {
|
|
8310
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
8311
|
+
};
|
|
8312
|
+
|
|
8313
|
+
|
|
8314
|
+
/**
|
|
8315
|
+
* @param {number} value
|
|
8316
|
+
* @return {!proto.cashback.ActivateCashbackForUserResponse} returns this
|
|
8317
|
+
*/
|
|
8318
|
+
proto.cashback.ActivateCashbackForUserResponse.prototype.setCashbackUserId = function(value) {
|
|
8319
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
8320
|
+
};
|
|
8321
|
+
|
|
8322
|
+
|
|
8323
|
+
/**
|
|
8324
|
+
* optional string status = 2;
|
|
8325
|
+
* @return {string}
|
|
8326
|
+
*/
|
|
8327
|
+
proto.cashback.ActivateCashbackForUserResponse.prototype.getStatus = function() {
|
|
8328
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
8329
|
+
};
|
|
8330
|
+
|
|
8331
|
+
|
|
8332
|
+
/**
|
|
8333
|
+
* @param {string} value
|
|
8334
|
+
* @return {!proto.cashback.ActivateCashbackForUserResponse} returns this
|
|
8335
|
+
*/
|
|
8336
|
+
proto.cashback.ActivateCashbackForUserResponse.prototype.setStatus = function(value) {
|
|
8337
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
8338
|
+
};
|
|
8339
|
+
|
|
8340
|
+
|
|
8341
|
+
|
|
8342
|
+
|
|
8343
|
+
|
|
7920
8344
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
7921
8345
|
/**
|
|
7922
8346
|
* Creates an object representation of this proto.
|
package/loyalty/loyalty.proto
CHANGED
|
@@ -14,6 +14,7 @@ service Loyalty {
|
|
|
14
14
|
rpc setLoyaltyLevelTranslation(LevelTranslationRequest) returns (LevelStatusResponse);
|
|
15
15
|
rpc getLoyaltyLevelTranslation(GetLevelTranslationRequest) returns (LevelTranslationResponse);
|
|
16
16
|
rpc updateLevelsInBunch(ItemsBunchRequest) returns (LevelStatusResponse);
|
|
17
|
+
rpc replaceLevelRewards(ReplaceLevelRewardsRequest) returns (LevelResponse);
|
|
17
18
|
//Loyalty Points
|
|
18
19
|
rpc createSinglePoint(PointRequest) returns (PointResponse);
|
|
19
20
|
rpc readSinglePoint(GetPointRequest) returns (PointResponse);
|
|
@@ -66,6 +67,30 @@ message LevelItem {
|
|
|
66
67
|
optional int32 value_to_complete = 8;
|
|
67
68
|
optional int32 value_from = 9;
|
|
68
69
|
repeated LevelTranslationItem translations = 10;
|
|
70
|
+
repeated LevelRewardItem rewards = 11;
|
|
71
|
+
}
|
|
72
|
+
message LevelRewardTranslationItem {
|
|
73
|
+
string locale = 1;
|
|
74
|
+
string value = 2;
|
|
75
|
+
}
|
|
76
|
+
message LevelRewardItem {
|
|
77
|
+
optional int32 id = 1;
|
|
78
|
+
string type = 2;
|
|
79
|
+
int32 position = 3;
|
|
80
|
+
optional string target_reference = 4;
|
|
81
|
+
optional string config = 5;
|
|
82
|
+
repeated LevelRewardTranslationItem translations = 6;
|
|
83
|
+
}
|
|
84
|
+
message LevelRewardRequest {
|
|
85
|
+
string type = 1;
|
|
86
|
+
int32 position = 2;
|
|
87
|
+
optional string target_reference = 3;
|
|
88
|
+
optional string config = 4;
|
|
89
|
+
repeated LevelRewardTranslationItem translations = 5;
|
|
90
|
+
}
|
|
91
|
+
message ReplaceLevelRewardsRequest {
|
|
92
|
+
int32 loyalty_level_id = 1;
|
|
93
|
+
repeated LevelRewardRequest rewards = 2;
|
|
69
94
|
}
|
|
70
95
|
//Level CRUD | Requests
|
|
71
96
|
message LevelRequest {
|
|
@@ -224,6 +224,17 @@ function deserialize_loyalty_PongResponse(buffer_arg) {
|
|
|
224
224
|
return loyalty_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
function serialize_loyalty_ReplaceLevelRewardsRequest(arg) {
|
|
228
|
+
if (!(arg instanceof loyalty_pb.ReplaceLevelRewardsRequest)) {
|
|
229
|
+
throw new Error('Expected argument of type loyalty.ReplaceLevelRewardsRequest');
|
|
230
|
+
}
|
|
231
|
+
return Buffer.from(arg.serializeBinary());
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function deserialize_loyalty_ReplaceLevelRewardsRequest(buffer_arg) {
|
|
235
|
+
return loyalty_pb.ReplaceLevelRewardsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
236
|
+
}
|
|
237
|
+
|
|
227
238
|
function serialize_loyalty_UserLoyaltyPointsResponse(arg) {
|
|
228
239
|
if (!(arg instanceof loyalty_pb.UserLoyaltyPointsResponse)) {
|
|
229
240
|
throw new Error('Expected argument of type loyalty.UserLoyaltyPointsResponse');
|
|
@@ -359,6 +370,17 @@ createSingleLevel: {
|
|
|
359
370
|
responseSerialize: serialize_loyalty_LevelStatusResponse,
|
|
360
371
|
responseDeserialize: deserialize_loyalty_LevelStatusResponse,
|
|
361
372
|
},
|
|
373
|
+
replaceLevelRewards: {
|
|
374
|
+
path: '/loyalty.Loyalty/replaceLevelRewards',
|
|
375
|
+
requestStream: false,
|
|
376
|
+
responseStream: false,
|
|
377
|
+
requestType: loyalty_pb.ReplaceLevelRewardsRequest,
|
|
378
|
+
responseType: loyalty_pb.LevelResponse,
|
|
379
|
+
requestSerialize: serialize_loyalty_ReplaceLevelRewardsRequest,
|
|
380
|
+
requestDeserialize: deserialize_loyalty_ReplaceLevelRewardsRequest,
|
|
381
|
+
responseSerialize: serialize_loyalty_LevelResponse,
|
|
382
|
+
responseDeserialize: deserialize_loyalty_LevelResponse,
|
|
383
|
+
},
|
|
362
384
|
// Loyalty Points
|
|
363
385
|
createSinglePoint: {
|
|
364
386
|
path: '/loyalty.Loyalty/createSinglePoint',
|