protobuf-platform 1.0.185 → 1.0.187
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/loyalty/loyalty.proto +16 -1
- package/loyalty/loyalty_grpc_pb.js +34 -0
- package/loyalty/loyalty_pb.js +658 -0
- package/package.json +1 -1
- package/user/user.proto +11 -0
- package/user/user_pb.js +510 -1
package/loyalty/loyalty.proto
CHANGED
@@ -17,6 +17,8 @@ service Loyalty {
|
|
17
17
|
rpc updateSinglePoint(PointRequest) returns (PointResponse);
|
18
18
|
rpc deleteSinglePoint(GetPointRequest) returns (PointStatusResponse);
|
19
19
|
rpc readListPoints(PaginationRequest) returns (PointItemsResponse);
|
20
|
+
//Users
|
21
|
+
rpc getUserLoyalty(GetUserLoyaltyRequest) returns (UserLoyaltyResponse);
|
20
22
|
}
|
21
23
|
|
22
24
|
message PingRequest { string ping = 1; }
|
@@ -73,7 +75,6 @@ message LevelStatusResponse {
|
|
73
75
|
string status = 1;
|
74
76
|
}
|
75
77
|
|
76
|
-
|
77
78
|
//Point CRUD
|
78
79
|
message SignUpPoint {
|
79
80
|
string country = 1;
|
@@ -125,4 +126,18 @@ message PointItemsResponse {
|
|
125
126
|
}
|
126
127
|
message PointStatusResponse {
|
127
128
|
string status = 1;
|
129
|
+
}
|
130
|
+
//User
|
131
|
+
message GetUserLoyaltyRequest {
|
132
|
+
int32 user_id = 1;
|
133
|
+
optional bool admin_side = 2;
|
134
|
+
}
|
135
|
+
message UserLoyaltyResponse {
|
136
|
+
optional int32 loyalty_id = 1;
|
137
|
+
optional int32 loyalty_level = 2;
|
138
|
+
optional string title = 3;
|
139
|
+
optional string description = 4;
|
140
|
+
optional int32 points_to_complete = 5;
|
141
|
+
optional string image = 6;
|
142
|
+
optional int32 current_points = 7;
|
128
143
|
}
|
@@ -48,6 +48,17 @@ function deserialize_loyalty_GetPointRequest(buffer_arg) {
|
|
48
48
|
return loyalty_pb.GetPointRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
49
49
|
}
|
50
50
|
|
51
|
+
function serialize_loyalty_GetUserLoyaltyRequest(arg) {
|
52
|
+
if (!(arg instanceof loyalty_pb.GetUserLoyaltyRequest)) {
|
53
|
+
throw new Error('Expected argument of type loyalty.GetUserLoyaltyRequest');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_loyalty_GetUserLoyaltyRequest(buffer_arg) {
|
59
|
+
return loyalty_pb.GetUserLoyaltyRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
51
62
|
function serialize_loyalty_LevelItemsResponse(arg) {
|
52
63
|
if (!(arg instanceof loyalty_pb.LevelItemsResponse)) {
|
53
64
|
throw new Error('Expected argument of type loyalty.LevelItemsResponse');
|
@@ -169,6 +180,17 @@ function deserialize_loyalty_PongResponse(buffer_arg) {
|
|
169
180
|
return loyalty_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
170
181
|
}
|
171
182
|
|
183
|
+
function serialize_loyalty_UserLoyaltyResponse(arg) {
|
184
|
+
if (!(arg instanceof loyalty_pb.UserLoyaltyResponse)) {
|
185
|
+
throw new Error('Expected argument of type loyalty.UserLoyaltyResponse');
|
186
|
+
}
|
187
|
+
return Buffer.from(arg.serializeBinary());
|
188
|
+
}
|
189
|
+
|
190
|
+
function deserialize_loyalty_UserLoyaltyResponse(buffer_arg) {
|
191
|
+
return loyalty_pb.UserLoyaltyResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
192
|
+
}
|
193
|
+
|
172
194
|
|
173
195
|
var LoyaltyService = exports.LoyaltyService = {
|
174
196
|
checkConnection: {
|
@@ -305,6 +327,18 @@ createSinglePoint: {
|
|
305
327
|
responseSerialize: serialize_loyalty_PointItemsResponse,
|
306
328
|
responseDeserialize: deserialize_loyalty_PointItemsResponse,
|
307
329
|
},
|
330
|
+
// Users
|
331
|
+
getUserLoyalty: {
|
332
|
+
path: '/loyalty.Loyalty/getUserLoyalty',
|
333
|
+
requestStream: false,
|
334
|
+
responseStream: false,
|
335
|
+
requestType: loyalty_pb.GetUserLoyaltyRequest,
|
336
|
+
responseType: loyalty_pb.UserLoyaltyResponse,
|
337
|
+
requestSerialize: serialize_loyalty_GetUserLoyaltyRequest,
|
338
|
+
requestDeserialize: deserialize_loyalty_GetUserLoyaltyRequest,
|
339
|
+
responseSerialize: serialize_loyalty_UserLoyaltyResponse,
|
340
|
+
responseDeserialize: deserialize_loyalty_UserLoyaltyResponse,
|
341
|
+
},
|
308
342
|
};
|
309
343
|
|
310
344
|
exports.LoyaltyClient = grpc.makeGenericClientConstructor(LoyaltyService);
|
package/loyalty/loyalty_pb.js
CHANGED
@@ -27,6 +27,7 @@ goog.exportSymbol('proto.loyalty.File', null, global);
|
|
27
27
|
goog.exportSymbol('proto.loyalty.GetFileRequest', null, global);
|
28
28
|
goog.exportSymbol('proto.loyalty.GetLevelRequest', null, global);
|
29
29
|
goog.exportSymbol('proto.loyalty.GetPointRequest', null, global);
|
30
|
+
goog.exportSymbol('proto.loyalty.GetUserLoyaltyRequest', null, global);
|
30
31
|
goog.exportSymbol('proto.loyalty.LevelItem', null, global);
|
31
32
|
goog.exportSymbol('proto.loyalty.LevelItemRequest', null, global);
|
32
33
|
goog.exportSymbol('proto.loyalty.LevelItemsResponse', null, global);
|
@@ -44,6 +45,7 @@ goog.exportSymbol('proto.loyalty.PointResponse', null, global);
|
|
44
45
|
goog.exportSymbol('proto.loyalty.PointStatusResponse', null, global);
|
45
46
|
goog.exportSymbol('proto.loyalty.PongResponse', null, global);
|
46
47
|
goog.exportSymbol('proto.loyalty.SignUpPoint', null, global);
|
48
|
+
goog.exportSymbol('proto.loyalty.UserLoyaltyResponse', null, global);
|
47
49
|
/**
|
48
50
|
* Generated by JsPbCodeGenerator.
|
49
51
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -506,6 +508,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
506
508
|
*/
|
507
509
|
proto.loyalty.PointStatusResponse.displayName = 'proto.loyalty.PointStatusResponse';
|
508
510
|
}
|
511
|
+
/**
|
512
|
+
* Generated by JsPbCodeGenerator.
|
513
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
514
|
+
* server response, or constructed directly in Javascript. The array is used
|
515
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
516
|
+
* If no data is provided, the constructed object will be empty, but still
|
517
|
+
* valid.
|
518
|
+
* @extends {jspb.Message}
|
519
|
+
* @constructor
|
520
|
+
*/
|
521
|
+
proto.loyalty.GetUserLoyaltyRequest = function(opt_data) {
|
522
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
523
|
+
};
|
524
|
+
goog.inherits(proto.loyalty.GetUserLoyaltyRequest, jspb.Message);
|
525
|
+
if (goog.DEBUG && !COMPILED) {
|
526
|
+
/**
|
527
|
+
* @public
|
528
|
+
* @override
|
529
|
+
*/
|
530
|
+
proto.loyalty.GetUserLoyaltyRequest.displayName = 'proto.loyalty.GetUserLoyaltyRequest';
|
531
|
+
}
|
532
|
+
/**
|
533
|
+
* Generated by JsPbCodeGenerator.
|
534
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
535
|
+
* server response, or constructed directly in Javascript. The array is used
|
536
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
537
|
+
* If no data is provided, the constructed object will be empty, but still
|
538
|
+
* valid.
|
539
|
+
* @extends {jspb.Message}
|
540
|
+
* @constructor
|
541
|
+
*/
|
542
|
+
proto.loyalty.UserLoyaltyResponse = function(opt_data) {
|
543
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
544
|
+
};
|
545
|
+
goog.inherits(proto.loyalty.UserLoyaltyResponse, jspb.Message);
|
546
|
+
if (goog.DEBUG && !COMPILED) {
|
547
|
+
/**
|
548
|
+
* @public
|
549
|
+
* @override
|
550
|
+
*/
|
551
|
+
proto.loyalty.UserLoyaltyResponse.displayName = 'proto.loyalty.UserLoyaltyResponse';
|
552
|
+
}
|
509
553
|
|
510
554
|
|
511
555
|
|
@@ -5585,4 +5629,618 @@ proto.loyalty.PointStatusResponse.prototype.setStatus = function(value) {
|
|
5585
5629
|
};
|
5586
5630
|
|
5587
5631
|
|
5632
|
+
|
5633
|
+
|
5634
|
+
|
5635
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5636
|
+
/**
|
5637
|
+
* Creates an object representation of this proto.
|
5638
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5639
|
+
* Optional fields that are not set will be set to undefined.
|
5640
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5641
|
+
* For the list of reserved names please see:
|
5642
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5643
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5644
|
+
* JSPB instance for transitional soy proto support:
|
5645
|
+
* http://goto/soy-param-migration
|
5646
|
+
* @return {!Object}
|
5647
|
+
*/
|
5648
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.toObject = function(opt_includeInstance) {
|
5649
|
+
return proto.loyalty.GetUserLoyaltyRequest.toObject(opt_includeInstance, this);
|
5650
|
+
};
|
5651
|
+
|
5652
|
+
|
5653
|
+
/**
|
5654
|
+
* Static version of the {@see toObject} method.
|
5655
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5656
|
+
* the JSPB instance for transitional soy proto support:
|
5657
|
+
* http://goto/soy-param-migration
|
5658
|
+
* @param {!proto.loyalty.GetUserLoyaltyRequest} msg The msg instance to transform.
|
5659
|
+
* @return {!Object}
|
5660
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5661
|
+
*/
|
5662
|
+
proto.loyalty.GetUserLoyaltyRequest.toObject = function(includeInstance, msg) {
|
5663
|
+
var f, obj = {
|
5664
|
+
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5665
|
+
adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
|
5666
|
+
};
|
5667
|
+
|
5668
|
+
if (includeInstance) {
|
5669
|
+
obj.$jspbMessageInstance = msg;
|
5670
|
+
}
|
5671
|
+
return obj;
|
5672
|
+
};
|
5673
|
+
}
|
5674
|
+
|
5675
|
+
|
5676
|
+
/**
|
5677
|
+
* Deserializes binary data (in protobuf wire format).
|
5678
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5679
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest}
|
5680
|
+
*/
|
5681
|
+
proto.loyalty.GetUserLoyaltyRequest.deserializeBinary = function(bytes) {
|
5682
|
+
var reader = new jspb.BinaryReader(bytes);
|
5683
|
+
var msg = new proto.loyalty.GetUserLoyaltyRequest;
|
5684
|
+
return proto.loyalty.GetUserLoyaltyRequest.deserializeBinaryFromReader(msg, reader);
|
5685
|
+
};
|
5686
|
+
|
5687
|
+
|
5688
|
+
/**
|
5689
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5690
|
+
* given reader into the given message object.
|
5691
|
+
* @param {!proto.loyalty.GetUserLoyaltyRequest} msg The message object to deserialize into.
|
5692
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5693
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest}
|
5694
|
+
*/
|
5695
|
+
proto.loyalty.GetUserLoyaltyRequest.deserializeBinaryFromReader = function(msg, reader) {
|
5696
|
+
while (reader.nextField()) {
|
5697
|
+
if (reader.isEndGroup()) {
|
5698
|
+
break;
|
5699
|
+
}
|
5700
|
+
var field = reader.getFieldNumber();
|
5701
|
+
switch (field) {
|
5702
|
+
case 1:
|
5703
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5704
|
+
msg.setUserId(value);
|
5705
|
+
break;
|
5706
|
+
case 2:
|
5707
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
5708
|
+
msg.setAdminSide(value);
|
5709
|
+
break;
|
5710
|
+
default:
|
5711
|
+
reader.skipField();
|
5712
|
+
break;
|
5713
|
+
}
|
5714
|
+
}
|
5715
|
+
return msg;
|
5716
|
+
};
|
5717
|
+
|
5718
|
+
|
5719
|
+
/**
|
5720
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5721
|
+
* @return {!Uint8Array}
|
5722
|
+
*/
|
5723
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.serializeBinary = function() {
|
5724
|
+
var writer = new jspb.BinaryWriter();
|
5725
|
+
proto.loyalty.GetUserLoyaltyRequest.serializeBinaryToWriter(this, writer);
|
5726
|
+
return writer.getResultBuffer();
|
5727
|
+
};
|
5728
|
+
|
5729
|
+
|
5730
|
+
/**
|
5731
|
+
* Serializes the given message to binary data (in protobuf wire
|
5732
|
+
* format), writing to the given BinaryWriter.
|
5733
|
+
* @param {!proto.loyalty.GetUserLoyaltyRequest} message
|
5734
|
+
* @param {!jspb.BinaryWriter} writer
|
5735
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5736
|
+
*/
|
5737
|
+
proto.loyalty.GetUserLoyaltyRequest.serializeBinaryToWriter = function(message, writer) {
|
5738
|
+
var f = undefined;
|
5739
|
+
f = message.getUserId();
|
5740
|
+
if (f !== 0) {
|
5741
|
+
writer.writeInt32(
|
5742
|
+
1,
|
5743
|
+
f
|
5744
|
+
);
|
5745
|
+
}
|
5746
|
+
f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
|
5747
|
+
if (f != null) {
|
5748
|
+
writer.writeBool(
|
5749
|
+
2,
|
5750
|
+
f
|
5751
|
+
);
|
5752
|
+
}
|
5753
|
+
};
|
5754
|
+
|
5755
|
+
|
5756
|
+
/**
|
5757
|
+
* optional int32 user_id = 1;
|
5758
|
+
* @return {number}
|
5759
|
+
*/
|
5760
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.getUserId = function() {
|
5761
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
5762
|
+
};
|
5763
|
+
|
5764
|
+
|
5765
|
+
/**
|
5766
|
+
* @param {number} value
|
5767
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5768
|
+
*/
|
5769
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.setUserId = function(value) {
|
5770
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
5771
|
+
};
|
5772
|
+
|
5773
|
+
|
5774
|
+
/**
|
5775
|
+
* optional bool admin_side = 2;
|
5776
|
+
* @return {boolean}
|
5777
|
+
*/
|
5778
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.getAdminSide = function() {
|
5779
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
|
5780
|
+
};
|
5781
|
+
|
5782
|
+
|
5783
|
+
/**
|
5784
|
+
* @param {boolean} value
|
5785
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5786
|
+
*/
|
5787
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.setAdminSide = function(value) {
|
5788
|
+
return jspb.Message.setField(this, 2, value);
|
5789
|
+
};
|
5790
|
+
|
5791
|
+
|
5792
|
+
/**
|
5793
|
+
* Clears the field making it undefined.
|
5794
|
+
* @return {!proto.loyalty.GetUserLoyaltyRequest} returns this
|
5795
|
+
*/
|
5796
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.clearAdminSide = function() {
|
5797
|
+
return jspb.Message.setField(this, 2, undefined);
|
5798
|
+
};
|
5799
|
+
|
5800
|
+
|
5801
|
+
/**
|
5802
|
+
* Returns whether this field is set.
|
5803
|
+
* @return {boolean}
|
5804
|
+
*/
|
5805
|
+
proto.loyalty.GetUserLoyaltyRequest.prototype.hasAdminSide = function() {
|
5806
|
+
return jspb.Message.getField(this, 2) != null;
|
5807
|
+
};
|
5808
|
+
|
5809
|
+
|
5810
|
+
|
5811
|
+
|
5812
|
+
|
5813
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5814
|
+
/**
|
5815
|
+
* Creates an object representation of this proto.
|
5816
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5817
|
+
* Optional fields that are not set will be set to undefined.
|
5818
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5819
|
+
* For the list of reserved names please see:
|
5820
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5821
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5822
|
+
* JSPB instance for transitional soy proto support:
|
5823
|
+
* http://goto/soy-param-migration
|
5824
|
+
* @return {!Object}
|
5825
|
+
*/
|
5826
|
+
proto.loyalty.UserLoyaltyResponse.prototype.toObject = function(opt_includeInstance) {
|
5827
|
+
return proto.loyalty.UserLoyaltyResponse.toObject(opt_includeInstance, this);
|
5828
|
+
};
|
5829
|
+
|
5830
|
+
|
5831
|
+
/**
|
5832
|
+
* Static version of the {@see toObject} method.
|
5833
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5834
|
+
* the JSPB instance for transitional soy proto support:
|
5835
|
+
* http://goto/soy-param-migration
|
5836
|
+
* @param {!proto.loyalty.UserLoyaltyResponse} msg The msg instance to transform.
|
5837
|
+
* @return {!Object}
|
5838
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5839
|
+
*/
|
5840
|
+
proto.loyalty.UserLoyaltyResponse.toObject = function(includeInstance, msg) {
|
5841
|
+
var f, obj = {
|
5842
|
+
loyaltyId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5843
|
+
loyaltyLevel: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
5844
|
+
title: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
5845
|
+
description: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
5846
|
+
pointsToComplete: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
5847
|
+
image: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
5848
|
+
currentPoints: jspb.Message.getFieldWithDefault(msg, 7, 0)
|
5849
|
+
};
|
5850
|
+
|
5851
|
+
if (includeInstance) {
|
5852
|
+
obj.$jspbMessageInstance = msg;
|
5853
|
+
}
|
5854
|
+
return obj;
|
5855
|
+
};
|
5856
|
+
}
|
5857
|
+
|
5858
|
+
|
5859
|
+
/**
|
5860
|
+
* Deserializes binary data (in protobuf wire format).
|
5861
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5862
|
+
* @return {!proto.loyalty.UserLoyaltyResponse}
|
5863
|
+
*/
|
5864
|
+
proto.loyalty.UserLoyaltyResponse.deserializeBinary = function(bytes) {
|
5865
|
+
var reader = new jspb.BinaryReader(bytes);
|
5866
|
+
var msg = new proto.loyalty.UserLoyaltyResponse;
|
5867
|
+
return proto.loyalty.UserLoyaltyResponse.deserializeBinaryFromReader(msg, reader);
|
5868
|
+
};
|
5869
|
+
|
5870
|
+
|
5871
|
+
/**
|
5872
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5873
|
+
* given reader into the given message object.
|
5874
|
+
* @param {!proto.loyalty.UserLoyaltyResponse} msg The message object to deserialize into.
|
5875
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5876
|
+
* @return {!proto.loyalty.UserLoyaltyResponse}
|
5877
|
+
*/
|
5878
|
+
proto.loyalty.UserLoyaltyResponse.deserializeBinaryFromReader = function(msg, reader) {
|
5879
|
+
while (reader.nextField()) {
|
5880
|
+
if (reader.isEndGroup()) {
|
5881
|
+
break;
|
5882
|
+
}
|
5883
|
+
var field = reader.getFieldNumber();
|
5884
|
+
switch (field) {
|
5885
|
+
case 1:
|
5886
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5887
|
+
msg.setLoyaltyId(value);
|
5888
|
+
break;
|
5889
|
+
case 2:
|
5890
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5891
|
+
msg.setLoyaltyLevel(value);
|
5892
|
+
break;
|
5893
|
+
case 3:
|
5894
|
+
var value = /** @type {string} */ (reader.readString());
|
5895
|
+
msg.setTitle(value);
|
5896
|
+
break;
|
5897
|
+
case 4:
|
5898
|
+
var value = /** @type {string} */ (reader.readString());
|
5899
|
+
msg.setDescription(value);
|
5900
|
+
break;
|
5901
|
+
case 5:
|
5902
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5903
|
+
msg.setPointsToComplete(value);
|
5904
|
+
break;
|
5905
|
+
case 6:
|
5906
|
+
var value = /** @type {string} */ (reader.readString());
|
5907
|
+
msg.setImage(value);
|
5908
|
+
break;
|
5909
|
+
case 7:
|
5910
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5911
|
+
msg.setCurrentPoints(value);
|
5912
|
+
break;
|
5913
|
+
default:
|
5914
|
+
reader.skipField();
|
5915
|
+
break;
|
5916
|
+
}
|
5917
|
+
}
|
5918
|
+
return msg;
|
5919
|
+
};
|
5920
|
+
|
5921
|
+
|
5922
|
+
/**
|
5923
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5924
|
+
* @return {!Uint8Array}
|
5925
|
+
*/
|
5926
|
+
proto.loyalty.UserLoyaltyResponse.prototype.serializeBinary = function() {
|
5927
|
+
var writer = new jspb.BinaryWriter();
|
5928
|
+
proto.loyalty.UserLoyaltyResponse.serializeBinaryToWriter(this, writer);
|
5929
|
+
return writer.getResultBuffer();
|
5930
|
+
};
|
5931
|
+
|
5932
|
+
|
5933
|
+
/**
|
5934
|
+
* Serializes the given message to binary data (in protobuf wire
|
5935
|
+
* format), writing to the given BinaryWriter.
|
5936
|
+
* @param {!proto.loyalty.UserLoyaltyResponse} message
|
5937
|
+
* @param {!jspb.BinaryWriter} writer
|
5938
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5939
|
+
*/
|
5940
|
+
proto.loyalty.UserLoyaltyResponse.serializeBinaryToWriter = function(message, writer) {
|
5941
|
+
var f = undefined;
|
5942
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 1));
|
5943
|
+
if (f != null) {
|
5944
|
+
writer.writeInt32(
|
5945
|
+
1,
|
5946
|
+
f
|
5947
|
+
);
|
5948
|
+
}
|
5949
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
5950
|
+
if (f != null) {
|
5951
|
+
writer.writeInt32(
|
5952
|
+
2,
|
5953
|
+
f
|
5954
|
+
);
|
5955
|
+
}
|
5956
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
5957
|
+
if (f != null) {
|
5958
|
+
writer.writeString(
|
5959
|
+
3,
|
5960
|
+
f
|
5961
|
+
);
|
5962
|
+
}
|
5963
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
5964
|
+
if (f != null) {
|
5965
|
+
writer.writeString(
|
5966
|
+
4,
|
5967
|
+
f
|
5968
|
+
);
|
5969
|
+
}
|
5970
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
5971
|
+
if (f != null) {
|
5972
|
+
writer.writeInt32(
|
5973
|
+
5,
|
5974
|
+
f
|
5975
|
+
);
|
5976
|
+
}
|
5977
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 6));
|
5978
|
+
if (f != null) {
|
5979
|
+
writer.writeString(
|
5980
|
+
6,
|
5981
|
+
f
|
5982
|
+
);
|
5983
|
+
}
|
5984
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 7));
|
5985
|
+
if (f != null) {
|
5986
|
+
writer.writeInt32(
|
5987
|
+
7,
|
5988
|
+
f
|
5989
|
+
);
|
5990
|
+
}
|
5991
|
+
};
|
5992
|
+
|
5993
|
+
|
5994
|
+
/**
|
5995
|
+
* optional int32 loyalty_id = 1;
|
5996
|
+
* @return {number}
|
5997
|
+
*/
|
5998
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getLoyaltyId = function() {
|
5999
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
6000
|
+
};
|
6001
|
+
|
6002
|
+
|
6003
|
+
/**
|
6004
|
+
* @param {number} value
|
6005
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6006
|
+
*/
|
6007
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setLoyaltyId = function(value) {
|
6008
|
+
return jspb.Message.setField(this, 1, value);
|
6009
|
+
};
|
6010
|
+
|
6011
|
+
|
6012
|
+
/**
|
6013
|
+
* Clears the field making it undefined.
|
6014
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6015
|
+
*/
|
6016
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearLoyaltyId = function() {
|
6017
|
+
return jspb.Message.setField(this, 1, undefined);
|
6018
|
+
};
|
6019
|
+
|
6020
|
+
|
6021
|
+
/**
|
6022
|
+
* Returns whether this field is set.
|
6023
|
+
* @return {boolean}
|
6024
|
+
*/
|
6025
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasLoyaltyId = function() {
|
6026
|
+
return jspb.Message.getField(this, 1) != null;
|
6027
|
+
};
|
6028
|
+
|
6029
|
+
|
6030
|
+
/**
|
6031
|
+
* optional int32 loyalty_level = 2;
|
6032
|
+
* @return {number}
|
6033
|
+
*/
|
6034
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getLoyaltyLevel = function() {
|
6035
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
6036
|
+
};
|
6037
|
+
|
6038
|
+
|
6039
|
+
/**
|
6040
|
+
* @param {number} value
|
6041
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6042
|
+
*/
|
6043
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setLoyaltyLevel = function(value) {
|
6044
|
+
return jspb.Message.setField(this, 2, value);
|
6045
|
+
};
|
6046
|
+
|
6047
|
+
|
6048
|
+
/**
|
6049
|
+
* Clears the field making it undefined.
|
6050
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6051
|
+
*/
|
6052
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearLoyaltyLevel = function() {
|
6053
|
+
return jspb.Message.setField(this, 2, undefined);
|
6054
|
+
};
|
6055
|
+
|
6056
|
+
|
6057
|
+
/**
|
6058
|
+
* Returns whether this field is set.
|
6059
|
+
* @return {boolean}
|
6060
|
+
*/
|
6061
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasLoyaltyLevel = function() {
|
6062
|
+
return jspb.Message.getField(this, 2) != null;
|
6063
|
+
};
|
6064
|
+
|
6065
|
+
|
6066
|
+
/**
|
6067
|
+
* optional string title = 3;
|
6068
|
+
* @return {string}
|
6069
|
+
*/
|
6070
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getTitle = function() {
|
6071
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
6072
|
+
};
|
6073
|
+
|
6074
|
+
|
6075
|
+
/**
|
6076
|
+
* @param {string} value
|
6077
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6078
|
+
*/
|
6079
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setTitle = function(value) {
|
6080
|
+
return jspb.Message.setField(this, 3, value);
|
6081
|
+
};
|
6082
|
+
|
6083
|
+
|
6084
|
+
/**
|
6085
|
+
* Clears the field making it undefined.
|
6086
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6087
|
+
*/
|
6088
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearTitle = function() {
|
6089
|
+
return jspb.Message.setField(this, 3, undefined);
|
6090
|
+
};
|
6091
|
+
|
6092
|
+
|
6093
|
+
/**
|
6094
|
+
* Returns whether this field is set.
|
6095
|
+
* @return {boolean}
|
6096
|
+
*/
|
6097
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasTitle = function() {
|
6098
|
+
return jspb.Message.getField(this, 3) != null;
|
6099
|
+
};
|
6100
|
+
|
6101
|
+
|
6102
|
+
/**
|
6103
|
+
* optional string description = 4;
|
6104
|
+
* @return {string}
|
6105
|
+
*/
|
6106
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getDescription = function() {
|
6107
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
6108
|
+
};
|
6109
|
+
|
6110
|
+
|
6111
|
+
/**
|
6112
|
+
* @param {string} value
|
6113
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6114
|
+
*/
|
6115
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setDescription = function(value) {
|
6116
|
+
return jspb.Message.setField(this, 4, value);
|
6117
|
+
};
|
6118
|
+
|
6119
|
+
|
6120
|
+
/**
|
6121
|
+
* Clears the field making it undefined.
|
6122
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6123
|
+
*/
|
6124
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearDescription = function() {
|
6125
|
+
return jspb.Message.setField(this, 4, undefined);
|
6126
|
+
};
|
6127
|
+
|
6128
|
+
|
6129
|
+
/**
|
6130
|
+
* Returns whether this field is set.
|
6131
|
+
* @return {boolean}
|
6132
|
+
*/
|
6133
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasDescription = function() {
|
6134
|
+
return jspb.Message.getField(this, 4) != null;
|
6135
|
+
};
|
6136
|
+
|
6137
|
+
|
6138
|
+
/**
|
6139
|
+
* optional int32 points_to_complete = 5;
|
6140
|
+
* @return {number}
|
6141
|
+
*/
|
6142
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getPointsToComplete = function() {
|
6143
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
6144
|
+
};
|
6145
|
+
|
6146
|
+
|
6147
|
+
/**
|
6148
|
+
* @param {number} value
|
6149
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6150
|
+
*/
|
6151
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setPointsToComplete = function(value) {
|
6152
|
+
return jspb.Message.setField(this, 5, value);
|
6153
|
+
};
|
6154
|
+
|
6155
|
+
|
6156
|
+
/**
|
6157
|
+
* Clears the field making it undefined.
|
6158
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6159
|
+
*/
|
6160
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearPointsToComplete = function() {
|
6161
|
+
return jspb.Message.setField(this, 5, undefined);
|
6162
|
+
};
|
6163
|
+
|
6164
|
+
|
6165
|
+
/**
|
6166
|
+
* Returns whether this field is set.
|
6167
|
+
* @return {boolean}
|
6168
|
+
*/
|
6169
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasPointsToComplete = function() {
|
6170
|
+
return jspb.Message.getField(this, 5) != null;
|
6171
|
+
};
|
6172
|
+
|
6173
|
+
|
6174
|
+
/**
|
6175
|
+
* optional string image = 6;
|
6176
|
+
* @return {string}
|
6177
|
+
*/
|
6178
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getImage = function() {
|
6179
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
6180
|
+
};
|
6181
|
+
|
6182
|
+
|
6183
|
+
/**
|
6184
|
+
* @param {string} value
|
6185
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6186
|
+
*/
|
6187
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setImage = function(value) {
|
6188
|
+
return jspb.Message.setField(this, 6, value);
|
6189
|
+
};
|
6190
|
+
|
6191
|
+
|
6192
|
+
/**
|
6193
|
+
* Clears the field making it undefined.
|
6194
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6195
|
+
*/
|
6196
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearImage = function() {
|
6197
|
+
return jspb.Message.setField(this, 6, undefined);
|
6198
|
+
};
|
6199
|
+
|
6200
|
+
|
6201
|
+
/**
|
6202
|
+
* Returns whether this field is set.
|
6203
|
+
* @return {boolean}
|
6204
|
+
*/
|
6205
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasImage = function() {
|
6206
|
+
return jspb.Message.getField(this, 6) != null;
|
6207
|
+
};
|
6208
|
+
|
6209
|
+
|
6210
|
+
/**
|
6211
|
+
* optional int32 current_points = 7;
|
6212
|
+
* @return {number}
|
6213
|
+
*/
|
6214
|
+
proto.loyalty.UserLoyaltyResponse.prototype.getCurrentPoints = function() {
|
6215
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
|
6216
|
+
};
|
6217
|
+
|
6218
|
+
|
6219
|
+
/**
|
6220
|
+
* @param {number} value
|
6221
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6222
|
+
*/
|
6223
|
+
proto.loyalty.UserLoyaltyResponse.prototype.setCurrentPoints = function(value) {
|
6224
|
+
return jspb.Message.setField(this, 7, value);
|
6225
|
+
};
|
6226
|
+
|
6227
|
+
|
6228
|
+
/**
|
6229
|
+
* Clears the field making it undefined.
|
6230
|
+
* @return {!proto.loyalty.UserLoyaltyResponse} returns this
|
6231
|
+
*/
|
6232
|
+
proto.loyalty.UserLoyaltyResponse.prototype.clearCurrentPoints = function() {
|
6233
|
+
return jspb.Message.setField(this, 7, undefined);
|
6234
|
+
};
|
6235
|
+
|
6236
|
+
|
6237
|
+
/**
|
6238
|
+
* Returns whether this field is set.
|
6239
|
+
* @return {boolean}
|
6240
|
+
*/
|
6241
|
+
proto.loyalty.UserLoyaltyResponse.prototype.hasCurrentPoints = function() {
|
6242
|
+
return jspb.Message.getField(this, 7) != null;
|
6243
|
+
};
|
6244
|
+
|
6245
|
+
|
5588
6246
|
goog.object.extend(exports, proto.loyalty);
|
package/package.json
CHANGED
package/user/user.proto
CHANGED
@@ -100,6 +100,7 @@ message UserDataResponse {
|
|
100
100
|
optional string risk_status = 20;
|
101
101
|
optional string category = 21;
|
102
102
|
optional string created = 22;
|
103
|
+
optional UserLoyaltyItem loyalty = 23;
|
103
104
|
}
|
104
105
|
message UsersResponse {
|
105
106
|
repeated UserDataResponse items = 1;
|
@@ -118,6 +119,16 @@ message RolePermissionRequest {
|
|
118
119
|
message RolePermissionStatusResponse {
|
119
120
|
string status = 1;
|
120
121
|
}
|
122
|
+
//Loyalty
|
123
|
+
message UserLoyaltyItem {
|
124
|
+
optional int32 loyalty_id = 1;
|
125
|
+
optional int32 loyalty_level = 2;
|
126
|
+
optional string title = 3;
|
127
|
+
optional string description = 4;
|
128
|
+
optional int32 current_points = 5;
|
129
|
+
optional int32 points_to_complete = 6;
|
130
|
+
optional string image = 7;
|
131
|
+
}
|
121
132
|
//Roles
|
122
133
|
message Role {
|
123
134
|
int32 id = 1;
|
package/user/user_pb.js
CHANGED
@@ -40,6 +40,7 @@ goog.exportSymbol('proto.user.SegmentSearchParams', null, global);
|
|
40
40
|
goog.exportSymbol('proto.user.SegmentStatusResponse', null, global);
|
41
41
|
goog.exportSymbol('proto.user.UserDataRequest', null, global);
|
42
42
|
goog.exportSymbol('proto.user.UserDataResponse', null, global);
|
43
|
+
goog.exportSymbol('proto.user.UserLoyaltyItem', null, global);
|
43
44
|
goog.exportSymbol('proto.user.UserSearchParams', null, global);
|
44
45
|
goog.exportSymbol('proto.user.UsersResponse', null, global);
|
45
46
|
/**
|
@@ -315,6 +316,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
315
316
|
*/
|
316
317
|
proto.user.RolePermissionStatusResponse.displayName = 'proto.user.RolePermissionStatusResponse';
|
317
318
|
}
|
319
|
+
/**
|
320
|
+
* Generated by JsPbCodeGenerator.
|
321
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
322
|
+
* server response, or constructed directly in Javascript. The array is used
|
323
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
324
|
+
* If no data is provided, the constructed object will be empty, but still
|
325
|
+
* valid.
|
326
|
+
* @extends {jspb.Message}
|
327
|
+
* @constructor
|
328
|
+
*/
|
329
|
+
proto.user.UserLoyaltyItem = function(opt_data) {
|
330
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
331
|
+
};
|
332
|
+
goog.inherits(proto.user.UserLoyaltyItem, jspb.Message);
|
333
|
+
if (goog.DEBUG && !COMPILED) {
|
334
|
+
/**
|
335
|
+
* @public
|
336
|
+
* @override
|
337
|
+
*/
|
338
|
+
proto.user.UserLoyaltyItem.displayName = 'proto.user.UserLoyaltyItem';
|
339
|
+
}
|
318
340
|
/**
|
319
341
|
* Generated by JsPbCodeGenerator.
|
320
342
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -2821,7 +2843,8 @@ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
|
|
2821
2843
|
timezone: jspb.Message.getFieldWithDefault(msg, 19, ""),
|
2822
2844
|
riskStatus: jspb.Message.getFieldWithDefault(msg, 20, ""),
|
2823
2845
|
category: jspb.Message.getFieldWithDefault(msg, 21, ""),
|
2824
|
-
created: jspb.Message.getFieldWithDefault(msg, 22, "")
|
2846
|
+
created: jspb.Message.getFieldWithDefault(msg, 22, ""),
|
2847
|
+
loyalty: (f = msg.getLoyalty()) && proto.user.UserLoyaltyItem.toObject(includeInstance, f)
|
2825
2848
|
};
|
2826
2849
|
|
2827
2850
|
if (includeInstance) {
|
@@ -2946,6 +2969,11 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
|
|
2946
2969
|
var value = /** @type {string} */ (reader.readString());
|
2947
2970
|
msg.setCreated(value);
|
2948
2971
|
break;
|
2972
|
+
case 23:
|
2973
|
+
var value = new proto.user.UserLoyaltyItem;
|
2974
|
+
reader.readMessage(value,proto.user.UserLoyaltyItem.deserializeBinaryFromReader);
|
2975
|
+
msg.setLoyalty(value);
|
2976
|
+
break;
|
2949
2977
|
default:
|
2950
2978
|
reader.skipField();
|
2951
2979
|
break;
|
@@ -3129,6 +3157,14 @@ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer)
|
|
3129
3157
|
f
|
3130
3158
|
);
|
3131
3159
|
}
|
3160
|
+
f = message.getLoyalty();
|
3161
|
+
if (f != null) {
|
3162
|
+
writer.writeMessage(
|
3163
|
+
23,
|
3164
|
+
f,
|
3165
|
+
proto.user.UserLoyaltyItem.serializeBinaryToWriter
|
3166
|
+
);
|
3167
|
+
}
|
3132
3168
|
};
|
3133
3169
|
|
3134
3170
|
|
@@ -3888,6 +3924,43 @@ proto.user.UserDataResponse.prototype.hasCreated = function() {
|
|
3888
3924
|
};
|
3889
3925
|
|
3890
3926
|
|
3927
|
+
/**
|
3928
|
+
* optional UserLoyaltyItem loyalty = 23;
|
3929
|
+
* @return {?proto.user.UserLoyaltyItem}
|
3930
|
+
*/
|
3931
|
+
proto.user.UserDataResponse.prototype.getLoyalty = function() {
|
3932
|
+
return /** @type{?proto.user.UserLoyaltyItem} */ (
|
3933
|
+
jspb.Message.getWrapperField(this, proto.user.UserLoyaltyItem, 23));
|
3934
|
+
};
|
3935
|
+
|
3936
|
+
|
3937
|
+
/**
|
3938
|
+
* @param {?proto.user.UserLoyaltyItem|undefined} value
|
3939
|
+
* @return {!proto.user.UserDataResponse} returns this
|
3940
|
+
*/
|
3941
|
+
proto.user.UserDataResponse.prototype.setLoyalty = function(value) {
|
3942
|
+
return jspb.Message.setWrapperField(this, 23, value);
|
3943
|
+
};
|
3944
|
+
|
3945
|
+
|
3946
|
+
/**
|
3947
|
+
* Clears the message field making it undefined.
|
3948
|
+
* @return {!proto.user.UserDataResponse} returns this
|
3949
|
+
*/
|
3950
|
+
proto.user.UserDataResponse.prototype.clearLoyalty = function() {
|
3951
|
+
return this.setLoyalty(undefined);
|
3952
|
+
};
|
3953
|
+
|
3954
|
+
|
3955
|
+
/**
|
3956
|
+
* Returns whether this field is set.
|
3957
|
+
* @return {boolean}
|
3958
|
+
*/
|
3959
|
+
proto.user.UserDataResponse.prototype.hasLoyalty = function() {
|
3960
|
+
return jspb.Message.getField(this, 23) != null;
|
3961
|
+
};
|
3962
|
+
|
3963
|
+
|
3891
3964
|
|
3892
3965
|
/**
|
3893
3966
|
* List of repeated fields within this message type.
|
@@ -4593,6 +4666,442 @@ proto.user.RolePermissionStatusResponse.prototype.setStatus = function(value) {
|
|
4593
4666
|
|
4594
4667
|
|
4595
4668
|
|
4669
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
4670
|
+
/**
|
4671
|
+
* Creates an object representation of this proto.
|
4672
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
4673
|
+
* Optional fields that are not set will be set to undefined.
|
4674
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
4675
|
+
* For the list of reserved names please see:
|
4676
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
4677
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
4678
|
+
* JSPB instance for transitional soy proto support:
|
4679
|
+
* http://goto/soy-param-migration
|
4680
|
+
* @return {!Object}
|
4681
|
+
*/
|
4682
|
+
proto.user.UserLoyaltyItem.prototype.toObject = function(opt_includeInstance) {
|
4683
|
+
return proto.user.UserLoyaltyItem.toObject(opt_includeInstance, this);
|
4684
|
+
};
|
4685
|
+
|
4686
|
+
|
4687
|
+
/**
|
4688
|
+
* Static version of the {@see toObject} method.
|
4689
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
4690
|
+
* the JSPB instance for transitional soy proto support:
|
4691
|
+
* http://goto/soy-param-migration
|
4692
|
+
* @param {!proto.user.UserLoyaltyItem} msg The msg instance to transform.
|
4693
|
+
* @return {!Object}
|
4694
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
4695
|
+
*/
|
4696
|
+
proto.user.UserLoyaltyItem.toObject = function(includeInstance, msg) {
|
4697
|
+
var f, obj = {
|
4698
|
+
loyaltyId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
4699
|
+
loyaltyLevel: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
4700
|
+
title: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
4701
|
+
description: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
4702
|
+
currentPoints: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
4703
|
+
pointsToComplete: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
4704
|
+
image: jspb.Message.getFieldWithDefault(msg, 7, "")
|
4705
|
+
};
|
4706
|
+
|
4707
|
+
if (includeInstance) {
|
4708
|
+
obj.$jspbMessageInstance = msg;
|
4709
|
+
}
|
4710
|
+
return obj;
|
4711
|
+
};
|
4712
|
+
}
|
4713
|
+
|
4714
|
+
|
4715
|
+
/**
|
4716
|
+
* Deserializes binary data (in protobuf wire format).
|
4717
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
4718
|
+
* @return {!proto.user.UserLoyaltyItem}
|
4719
|
+
*/
|
4720
|
+
proto.user.UserLoyaltyItem.deserializeBinary = function(bytes) {
|
4721
|
+
var reader = new jspb.BinaryReader(bytes);
|
4722
|
+
var msg = new proto.user.UserLoyaltyItem;
|
4723
|
+
return proto.user.UserLoyaltyItem.deserializeBinaryFromReader(msg, reader);
|
4724
|
+
};
|
4725
|
+
|
4726
|
+
|
4727
|
+
/**
|
4728
|
+
* Deserializes binary data (in protobuf wire format) from the
|
4729
|
+
* given reader into the given message object.
|
4730
|
+
* @param {!proto.user.UserLoyaltyItem} msg The message object to deserialize into.
|
4731
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
4732
|
+
* @return {!proto.user.UserLoyaltyItem}
|
4733
|
+
*/
|
4734
|
+
proto.user.UserLoyaltyItem.deserializeBinaryFromReader = function(msg, reader) {
|
4735
|
+
while (reader.nextField()) {
|
4736
|
+
if (reader.isEndGroup()) {
|
4737
|
+
break;
|
4738
|
+
}
|
4739
|
+
var field = reader.getFieldNumber();
|
4740
|
+
switch (field) {
|
4741
|
+
case 1:
|
4742
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4743
|
+
msg.setLoyaltyId(value);
|
4744
|
+
break;
|
4745
|
+
case 2:
|
4746
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4747
|
+
msg.setLoyaltyLevel(value);
|
4748
|
+
break;
|
4749
|
+
case 3:
|
4750
|
+
var value = /** @type {string} */ (reader.readString());
|
4751
|
+
msg.setTitle(value);
|
4752
|
+
break;
|
4753
|
+
case 4:
|
4754
|
+
var value = /** @type {string} */ (reader.readString());
|
4755
|
+
msg.setDescription(value);
|
4756
|
+
break;
|
4757
|
+
case 5:
|
4758
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4759
|
+
msg.setCurrentPoints(value);
|
4760
|
+
break;
|
4761
|
+
case 6:
|
4762
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4763
|
+
msg.setPointsToComplete(value);
|
4764
|
+
break;
|
4765
|
+
case 7:
|
4766
|
+
var value = /** @type {string} */ (reader.readString());
|
4767
|
+
msg.setImage(value);
|
4768
|
+
break;
|
4769
|
+
default:
|
4770
|
+
reader.skipField();
|
4771
|
+
break;
|
4772
|
+
}
|
4773
|
+
}
|
4774
|
+
return msg;
|
4775
|
+
};
|
4776
|
+
|
4777
|
+
|
4778
|
+
/**
|
4779
|
+
* Serializes the message to binary data (in protobuf wire format).
|
4780
|
+
* @return {!Uint8Array}
|
4781
|
+
*/
|
4782
|
+
proto.user.UserLoyaltyItem.prototype.serializeBinary = function() {
|
4783
|
+
var writer = new jspb.BinaryWriter();
|
4784
|
+
proto.user.UserLoyaltyItem.serializeBinaryToWriter(this, writer);
|
4785
|
+
return writer.getResultBuffer();
|
4786
|
+
};
|
4787
|
+
|
4788
|
+
|
4789
|
+
/**
|
4790
|
+
* Serializes the given message to binary data (in protobuf wire
|
4791
|
+
* format), writing to the given BinaryWriter.
|
4792
|
+
* @param {!proto.user.UserLoyaltyItem} message
|
4793
|
+
* @param {!jspb.BinaryWriter} writer
|
4794
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
4795
|
+
*/
|
4796
|
+
proto.user.UserLoyaltyItem.serializeBinaryToWriter = function(message, writer) {
|
4797
|
+
var f = undefined;
|
4798
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 1));
|
4799
|
+
if (f != null) {
|
4800
|
+
writer.writeInt32(
|
4801
|
+
1,
|
4802
|
+
f
|
4803
|
+
);
|
4804
|
+
}
|
4805
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
4806
|
+
if (f != null) {
|
4807
|
+
writer.writeInt32(
|
4808
|
+
2,
|
4809
|
+
f
|
4810
|
+
);
|
4811
|
+
}
|
4812
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
4813
|
+
if (f != null) {
|
4814
|
+
writer.writeString(
|
4815
|
+
3,
|
4816
|
+
f
|
4817
|
+
);
|
4818
|
+
}
|
4819
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
4820
|
+
if (f != null) {
|
4821
|
+
writer.writeString(
|
4822
|
+
4,
|
4823
|
+
f
|
4824
|
+
);
|
4825
|
+
}
|
4826
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 5));
|
4827
|
+
if (f != null) {
|
4828
|
+
writer.writeInt32(
|
4829
|
+
5,
|
4830
|
+
f
|
4831
|
+
);
|
4832
|
+
}
|
4833
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 6));
|
4834
|
+
if (f != null) {
|
4835
|
+
writer.writeInt32(
|
4836
|
+
6,
|
4837
|
+
f
|
4838
|
+
);
|
4839
|
+
}
|
4840
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 7));
|
4841
|
+
if (f != null) {
|
4842
|
+
writer.writeString(
|
4843
|
+
7,
|
4844
|
+
f
|
4845
|
+
);
|
4846
|
+
}
|
4847
|
+
};
|
4848
|
+
|
4849
|
+
|
4850
|
+
/**
|
4851
|
+
* optional int32 loyalty_id = 1;
|
4852
|
+
* @return {number}
|
4853
|
+
*/
|
4854
|
+
proto.user.UserLoyaltyItem.prototype.getLoyaltyId = function() {
|
4855
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
4856
|
+
};
|
4857
|
+
|
4858
|
+
|
4859
|
+
/**
|
4860
|
+
* @param {number} value
|
4861
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4862
|
+
*/
|
4863
|
+
proto.user.UserLoyaltyItem.prototype.setLoyaltyId = function(value) {
|
4864
|
+
return jspb.Message.setField(this, 1, value);
|
4865
|
+
};
|
4866
|
+
|
4867
|
+
|
4868
|
+
/**
|
4869
|
+
* Clears the field making it undefined.
|
4870
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4871
|
+
*/
|
4872
|
+
proto.user.UserLoyaltyItem.prototype.clearLoyaltyId = function() {
|
4873
|
+
return jspb.Message.setField(this, 1, undefined);
|
4874
|
+
};
|
4875
|
+
|
4876
|
+
|
4877
|
+
/**
|
4878
|
+
* Returns whether this field is set.
|
4879
|
+
* @return {boolean}
|
4880
|
+
*/
|
4881
|
+
proto.user.UserLoyaltyItem.prototype.hasLoyaltyId = function() {
|
4882
|
+
return jspb.Message.getField(this, 1) != null;
|
4883
|
+
};
|
4884
|
+
|
4885
|
+
|
4886
|
+
/**
|
4887
|
+
* optional int32 loyalty_level = 2;
|
4888
|
+
* @return {number}
|
4889
|
+
*/
|
4890
|
+
proto.user.UserLoyaltyItem.prototype.getLoyaltyLevel = function() {
|
4891
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
4892
|
+
};
|
4893
|
+
|
4894
|
+
|
4895
|
+
/**
|
4896
|
+
* @param {number} value
|
4897
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4898
|
+
*/
|
4899
|
+
proto.user.UserLoyaltyItem.prototype.setLoyaltyLevel = function(value) {
|
4900
|
+
return jspb.Message.setField(this, 2, value);
|
4901
|
+
};
|
4902
|
+
|
4903
|
+
|
4904
|
+
/**
|
4905
|
+
* Clears the field making it undefined.
|
4906
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4907
|
+
*/
|
4908
|
+
proto.user.UserLoyaltyItem.prototype.clearLoyaltyLevel = function() {
|
4909
|
+
return jspb.Message.setField(this, 2, undefined);
|
4910
|
+
};
|
4911
|
+
|
4912
|
+
|
4913
|
+
/**
|
4914
|
+
* Returns whether this field is set.
|
4915
|
+
* @return {boolean}
|
4916
|
+
*/
|
4917
|
+
proto.user.UserLoyaltyItem.prototype.hasLoyaltyLevel = function() {
|
4918
|
+
return jspb.Message.getField(this, 2) != null;
|
4919
|
+
};
|
4920
|
+
|
4921
|
+
|
4922
|
+
/**
|
4923
|
+
* optional string title = 3;
|
4924
|
+
* @return {string}
|
4925
|
+
*/
|
4926
|
+
proto.user.UserLoyaltyItem.prototype.getTitle = function() {
|
4927
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
4928
|
+
};
|
4929
|
+
|
4930
|
+
|
4931
|
+
/**
|
4932
|
+
* @param {string} value
|
4933
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4934
|
+
*/
|
4935
|
+
proto.user.UserLoyaltyItem.prototype.setTitle = function(value) {
|
4936
|
+
return jspb.Message.setField(this, 3, value);
|
4937
|
+
};
|
4938
|
+
|
4939
|
+
|
4940
|
+
/**
|
4941
|
+
* Clears the field making it undefined.
|
4942
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4943
|
+
*/
|
4944
|
+
proto.user.UserLoyaltyItem.prototype.clearTitle = function() {
|
4945
|
+
return jspb.Message.setField(this, 3, undefined);
|
4946
|
+
};
|
4947
|
+
|
4948
|
+
|
4949
|
+
/**
|
4950
|
+
* Returns whether this field is set.
|
4951
|
+
* @return {boolean}
|
4952
|
+
*/
|
4953
|
+
proto.user.UserLoyaltyItem.prototype.hasTitle = function() {
|
4954
|
+
return jspb.Message.getField(this, 3) != null;
|
4955
|
+
};
|
4956
|
+
|
4957
|
+
|
4958
|
+
/**
|
4959
|
+
* optional string description = 4;
|
4960
|
+
* @return {string}
|
4961
|
+
*/
|
4962
|
+
proto.user.UserLoyaltyItem.prototype.getDescription = function() {
|
4963
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
4964
|
+
};
|
4965
|
+
|
4966
|
+
|
4967
|
+
/**
|
4968
|
+
* @param {string} value
|
4969
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4970
|
+
*/
|
4971
|
+
proto.user.UserLoyaltyItem.prototype.setDescription = function(value) {
|
4972
|
+
return jspb.Message.setField(this, 4, value);
|
4973
|
+
};
|
4974
|
+
|
4975
|
+
|
4976
|
+
/**
|
4977
|
+
* Clears the field making it undefined.
|
4978
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
4979
|
+
*/
|
4980
|
+
proto.user.UserLoyaltyItem.prototype.clearDescription = function() {
|
4981
|
+
return jspb.Message.setField(this, 4, undefined);
|
4982
|
+
};
|
4983
|
+
|
4984
|
+
|
4985
|
+
/**
|
4986
|
+
* Returns whether this field is set.
|
4987
|
+
* @return {boolean}
|
4988
|
+
*/
|
4989
|
+
proto.user.UserLoyaltyItem.prototype.hasDescription = function() {
|
4990
|
+
return jspb.Message.getField(this, 4) != null;
|
4991
|
+
};
|
4992
|
+
|
4993
|
+
|
4994
|
+
/**
|
4995
|
+
* optional int32 current_points = 5;
|
4996
|
+
* @return {number}
|
4997
|
+
*/
|
4998
|
+
proto.user.UserLoyaltyItem.prototype.getCurrentPoints = function() {
|
4999
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
5000
|
+
};
|
5001
|
+
|
5002
|
+
|
5003
|
+
/**
|
5004
|
+
* @param {number} value
|
5005
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
5006
|
+
*/
|
5007
|
+
proto.user.UserLoyaltyItem.prototype.setCurrentPoints = function(value) {
|
5008
|
+
return jspb.Message.setField(this, 5, value);
|
5009
|
+
};
|
5010
|
+
|
5011
|
+
|
5012
|
+
/**
|
5013
|
+
* Clears the field making it undefined.
|
5014
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
5015
|
+
*/
|
5016
|
+
proto.user.UserLoyaltyItem.prototype.clearCurrentPoints = function() {
|
5017
|
+
return jspb.Message.setField(this, 5, undefined);
|
5018
|
+
};
|
5019
|
+
|
5020
|
+
|
5021
|
+
/**
|
5022
|
+
* Returns whether this field is set.
|
5023
|
+
* @return {boolean}
|
5024
|
+
*/
|
5025
|
+
proto.user.UserLoyaltyItem.prototype.hasCurrentPoints = function() {
|
5026
|
+
return jspb.Message.getField(this, 5) != null;
|
5027
|
+
};
|
5028
|
+
|
5029
|
+
|
5030
|
+
/**
|
5031
|
+
* optional int32 points_to_complete = 6;
|
5032
|
+
* @return {number}
|
5033
|
+
*/
|
5034
|
+
proto.user.UserLoyaltyItem.prototype.getPointsToComplete = function() {
|
5035
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
5036
|
+
};
|
5037
|
+
|
5038
|
+
|
5039
|
+
/**
|
5040
|
+
* @param {number} value
|
5041
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
5042
|
+
*/
|
5043
|
+
proto.user.UserLoyaltyItem.prototype.setPointsToComplete = function(value) {
|
5044
|
+
return jspb.Message.setField(this, 6, value);
|
5045
|
+
};
|
5046
|
+
|
5047
|
+
|
5048
|
+
/**
|
5049
|
+
* Clears the field making it undefined.
|
5050
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
5051
|
+
*/
|
5052
|
+
proto.user.UserLoyaltyItem.prototype.clearPointsToComplete = function() {
|
5053
|
+
return jspb.Message.setField(this, 6, undefined);
|
5054
|
+
};
|
5055
|
+
|
5056
|
+
|
5057
|
+
/**
|
5058
|
+
* Returns whether this field is set.
|
5059
|
+
* @return {boolean}
|
5060
|
+
*/
|
5061
|
+
proto.user.UserLoyaltyItem.prototype.hasPointsToComplete = function() {
|
5062
|
+
return jspb.Message.getField(this, 6) != null;
|
5063
|
+
};
|
5064
|
+
|
5065
|
+
|
5066
|
+
/**
|
5067
|
+
* optional string image = 7;
|
5068
|
+
* @return {string}
|
5069
|
+
*/
|
5070
|
+
proto.user.UserLoyaltyItem.prototype.getImage = function() {
|
5071
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
|
5072
|
+
};
|
5073
|
+
|
5074
|
+
|
5075
|
+
/**
|
5076
|
+
* @param {string} value
|
5077
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
5078
|
+
*/
|
5079
|
+
proto.user.UserLoyaltyItem.prototype.setImage = function(value) {
|
5080
|
+
return jspb.Message.setField(this, 7, value);
|
5081
|
+
};
|
5082
|
+
|
5083
|
+
|
5084
|
+
/**
|
5085
|
+
* Clears the field making it undefined.
|
5086
|
+
* @return {!proto.user.UserLoyaltyItem} returns this
|
5087
|
+
*/
|
5088
|
+
proto.user.UserLoyaltyItem.prototype.clearImage = function() {
|
5089
|
+
return jspb.Message.setField(this, 7, undefined);
|
5090
|
+
};
|
5091
|
+
|
5092
|
+
|
5093
|
+
/**
|
5094
|
+
* Returns whether this field is set.
|
5095
|
+
* @return {boolean}
|
5096
|
+
*/
|
5097
|
+
proto.user.UserLoyaltyItem.prototype.hasImage = function() {
|
5098
|
+
return jspb.Message.getField(this, 7) != null;
|
5099
|
+
};
|
5100
|
+
|
5101
|
+
|
5102
|
+
|
5103
|
+
|
5104
|
+
|
4596
5105
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
4597
5106
|
/**
|
4598
5107
|
* Creates an object representation of this proto.
|