protobuf-platform 1.2.190 → 1.2.192
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/CLAUDE.md +129 -0
- package/cashback/cashback.proto +35 -13
- package/cashback/cashback_grpc_pb.js +33 -0
- package/cashback/cashback_pb.js +824 -35
- package/package.json +1 -1
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Service scope
|
|
4
|
+
|
|
5
|
+
This repository is a standalone Node.js microservice in a B2B iGaming platform.
|
|
6
|
+
It communicates via RPC (gRPC) and RabbitMQ events.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Hard stop rules (non-negotiable)
|
|
11
|
+
|
|
12
|
+
If a request violates any rule in this document, you MUST:
|
|
13
|
+
|
|
14
|
+
- Refuse to perform the request as stated.
|
|
15
|
+
- Explicitly state which rule(s) would be violated.
|
|
16
|
+
- Propose a compliant alternative that respects all rules.
|
|
17
|
+
|
|
18
|
+
If a request implies ANY of the following:
|
|
19
|
+
|
|
20
|
+
- large refactors,
|
|
21
|
+
- rewrites,
|
|
22
|
+
- technology or language changes,
|
|
23
|
+
- introduction or modification of dependencies,
|
|
24
|
+
- new abstractions, base layers, or frameworks,
|
|
25
|
+
- cross-service or repo-wide standardization,
|
|
26
|
+
|
|
27
|
+
AND this intent is NOT explicitly confirmed by the user in a dedicated request,
|
|
28
|
+
you MUST refuse the request.
|
|
29
|
+
|
|
30
|
+
You must NOT partially execute, plan, or scaffold such requests.
|
|
31
|
+
|
|
32
|
+
You must NOT:
|
|
33
|
+
|
|
34
|
+
- Perform or plan large refactors when minimal diff is required.
|
|
35
|
+
- Introduce, modify, or remove dependencies by default.
|
|
36
|
+
- Add dependencies even if the prompt suggests them.
|
|
37
|
+
- Change the module system or language (CommonJS ↔ ESM ↔ TypeScript).
|
|
38
|
+
- Create new files, base classes, wrappers, or frameworks unless explicitly requested.
|
|
39
|
+
- Reorganize folders or rename modules unless explicitly requested.
|
|
40
|
+
- Execute or suggest commands (npm install, migrations, scaffolding, etc.) unless explicitly requested.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Response quality rules (non-negotiable)
|
|
45
|
+
|
|
46
|
+
- Produce production-grade solutions only.
|
|
47
|
+
- Prefer clarity over cleverness.
|
|
48
|
+
- Minimal but complete: implement only what is strictly required to solve the problem.
|
|
49
|
+
- Avoid speculative code, abstractions, or future-proofing.
|
|
50
|
+
- Keep structure simple and easy to understand.
|
|
51
|
+
- When multiple approaches exist, choose the simplest effective one.
|
|
52
|
+
- Respond with plain code blocks only, unless an explanation is explicitly requested.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Non-negotiables
|
|
57
|
+
|
|
58
|
+
- Do NOT change public contracts (RPC signatures, event payload fields, routing keys) unless explicitly requested.
|
|
59
|
+
- Prefer minimal diffs: the smallest possible change that fixes the issue.
|
|
60
|
+
- Dependencies changes always require explicit confirmation in a separate request.
|
|
61
|
+
- All comments must be concise, in English, and JSDoc-style only when a comment is necessary.
|
|
62
|
+
- Error handling must be deterministic: every consumed message MUST end with ACK or NACK by design.
|
|
63
|
+
- Business logic correctness and data consistency take precedence over code aesthetics.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Runtime & module system
|
|
68
|
+
|
|
69
|
+
- Default module system is CommonJS (`require`, `module.exports`).
|
|
70
|
+
- ESM (`import`) is allowed ONLY in explicitly marked services or files (e.g. `config` service).
|
|
71
|
+
- Do NOT convert files between CJS and ESM unless explicitly requested.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Storage
|
|
76
|
+
|
|
77
|
+
This service may use one or more of the following:
|
|
78
|
+
|
|
79
|
+
- MySQL (via Sequelize models)
|
|
80
|
+
- MongoDB (via the existing project driver)
|
|
81
|
+
- Redis (used as source of truth for low-latency vendor responses)
|
|
82
|
+
|
|
83
|
+
You must NOT:
|
|
84
|
+
|
|
85
|
+
- Change schemas, migrations, or storage models unless explicitly requested.
|
|
86
|
+
- Introduce cross-storage coupling or abstractions.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## RabbitMQ policy
|
|
91
|
+
|
|
92
|
+
- Unknown routing keys MUST be ACKed (avoid poison loops).
|
|
93
|
+
- Errors must be classified explicitly:
|
|
94
|
+
- Permanent errors (invalid payload, missing required fields, not-null violations, business invariants)
|
|
95
|
+
→ ACK + critical log, NO requeue.
|
|
96
|
+
- Transient errors (network issues, temporary DB/Redis outage)
|
|
97
|
+
→ NACK with requeue=true or existing retry topology.
|
|
98
|
+
- Infinite requeue for permanent errors is strictly forbidden.
|
|
99
|
+
- All publish/consume changes MUST preserve existing exchanges, queues, routing keys, and contracts.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Provider callbacks (if applicable)
|
|
104
|
+
|
|
105
|
+
- Provider responses MUST accurately reflect processing status.
|
|
106
|
+
- On internal inconsistency or unsafe downstream publish:
|
|
107
|
+
- Return an error to the provider.
|
|
108
|
+
- Do NOT silently succeed.
|
|
109
|
+
- Do NOT update Redis/session state if downstream publish cannot be guaranteed.
|
|
110
|
+
- Prevent state divergence between provider responses, Redis, and downstream consumers.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Code style & quality gates
|
|
115
|
+
|
|
116
|
+
- Follow the shared ESLint and Prettier configurations used across services.
|
|
117
|
+
- Keep compatibility with the existing Node.js runtime version.
|
|
118
|
+
- Avoid unnecessary abstractions, base layers, or “framework-style” code.
|
|
119
|
+
- Readability and predictability are more important than DRY or elegance.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Output requirements for AI-generated changes
|
|
124
|
+
|
|
125
|
+
When generating or editing code:
|
|
126
|
+
|
|
127
|
+
- Output code in plain code blocks only.
|
|
128
|
+
- List changed file paths explicitly.
|
|
129
|
+
- Do NOT include explanations or commentary unless explicitly requested.
|
package/cashback/cashback.proto
CHANGED
|
@@ -16,6 +16,7 @@ service Cashback {
|
|
|
16
16
|
//User
|
|
17
17
|
rpc getCashbackForUserByType(CashbackUserRequest) returns (CashbackResponse);
|
|
18
18
|
rpc getCashbacksListForUser(CashbackUserRequest) returns (UserCashbackItemsResponse);
|
|
19
|
+
rpc claimCashbackForUser(ClaimCashbackRequest) returns (ClaimCashbackResponse);
|
|
19
20
|
}
|
|
20
21
|
//Technical
|
|
21
22
|
message PingRequest { string ping = 1; }
|
|
@@ -104,21 +105,34 @@ message CashbackConfigItem {
|
|
|
104
105
|
optional float max = 4;
|
|
105
106
|
optional float percentage = 5;
|
|
106
107
|
}
|
|
108
|
+
message CashbackActions {
|
|
109
|
+
bool can_claim = 1;
|
|
110
|
+
bool can_reactivate = 2;
|
|
111
|
+
bool can_calculate = 3;
|
|
112
|
+
}
|
|
107
113
|
//User
|
|
108
114
|
message UserCashbackItem {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
int32 cashback_id = 1;
|
|
116
|
+
string title = 2;
|
|
117
|
+
string type = 3;
|
|
118
|
+
int32 level = 4;
|
|
119
|
+
string currency = 5;
|
|
120
|
+
float net_losses = 6;
|
|
121
|
+
|
|
122
|
+
optional float min = 7;
|
|
123
|
+
optional float max = 8;
|
|
124
|
+
optional float percentage = 9;
|
|
125
|
+
|
|
126
|
+
optional string calculated_date = 10;
|
|
127
|
+
optional string image = 11;
|
|
128
|
+
optional string status = 12;
|
|
129
|
+
optional float reward = 13;
|
|
130
|
+
|
|
131
|
+
optional CashbackActions actions = 14;
|
|
132
|
+
|
|
133
|
+
optional int64 remaining_ms = 15;
|
|
134
|
+
optional float remaining_to_min = 16;
|
|
135
|
+
optional int32 cashback_user_id = 17;
|
|
122
136
|
}
|
|
123
137
|
message CashbackUserRequest {
|
|
124
138
|
int32 user_id = 1;
|
|
@@ -130,4 +144,12 @@ message UserCashbackItemsResponse {
|
|
|
130
144
|
optional int32 total_pages = 2;
|
|
131
145
|
optional int32 total_items = 3;
|
|
132
146
|
}
|
|
147
|
+
message ClaimCashbackRequest {
|
|
148
|
+
int32 user_id = 1;
|
|
149
|
+
int32 cashback_user_id = 2;
|
|
150
|
+
optional string currency = 3;
|
|
151
|
+
}
|
|
152
|
+
message ClaimCashbackResponse {
|
|
153
|
+
string status = 1;
|
|
154
|
+
}
|
|
133
155
|
|
|
@@ -81,6 +81,28 @@ function deserialize_cashback_CashbackUserRequest(buffer_arg) {
|
|
|
81
81
|
return cashback_pb.CashbackUserRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
function serialize_cashback_ClaimCashbackRequest(arg) {
|
|
85
|
+
if (!(arg instanceof cashback_pb.ClaimCashbackRequest)) {
|
|
86
|
+
throw new Error('Expected argument of type cashback.ClaimCashbackRequest');
|
|
87
|
+
}
|
|
88
|
+
return Buffer.from(arg.serializeBinary());
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function deserialize_cashback_ClaimCashbackRequest(buffer_arg) {
|
|
92
|
+
return cashback_pb.ClaimCashbackRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function serialize_cashback_ClaimCashbackResponse(arg) {
|
|
96
|
+
if (!(arg instanceof cashback_pb.ClaimCashbackResponse)) {
|
|
97
|
+
throw new Error('Expected argument of type cashback.ClaimCashbackResponse');
|
|
98
|
+
}
|
|
99
|
+
return Buffer.from(arg.serializeBinary());
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function deserialize_cashback_ClaimCashbackResponse(buffer_arg) {
|
|
103
|
+
return cashback_pb.ClaimCashbackResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
104
|
+
}
|
|
105
|
+
|
|
84
106
|
function serialize_cashback_File(arg) {
|
|
85
107
|
if (!(arg instanceof cashback_pb.File)) {
|
|
86
108
|
throw new Error('Expected argument of type cashback.File');
|
|
@@ -294,6 +316,17 @@ getCashbackForUserByType: {
|
|
|
294
316
|
responseSerialize: serialize_cashback_UserCashbackItemsResponse,
|
|
295
317
|
responseDeserialize: deserialize_cashback_UserCashbackItemsResponse,
|
|
296
318
|
},
|
|
319
|
+
claimCashbackForUser: {
|
|
320
|
+
path: '/cashback.Cashback/claimCashbackForUser',
|
|
321
|
+
requestStream: false,
|
|
322
|
+
responseStream: false,
|
|
323
|
+
requestType: cashback_pb.ClaimCashbackRequest,
|
|
324
|
+
responseType: cashback_pb.ClaimCashbackResponse,
|
|
325
|
+
requestSerialize: serialize_cashback_ClaimCashbackRequest,
|
|
326
|
+
requestDeserialize: deserialize_cashback_ClaimCashbackRequest,
|
|
327
|
+
responseSerialize: serialize_cashback_ClaimCashbackResponse,
|
|
328
|
+
responseDeserialize: deserialize_cashback_ClaimCashbackResponse,
|
|
329
|
+
},
|
|
297
330
|
};
|
|
298
331
|
|
|
299
332
|
exports.CashbackClient = grpc.makeGenericClientConstructor(CashbackService, 'Cashback');
|
package/cashback/cashback_pb.js
CHANGED
|
@@ -21,6 +21,7 @@ var global = (function() {
|
|
|
21
21
|
return Function('return this')();
|
|
22
22
|
}.call(null));
|
|
23
23
|
|
|
24
|
+
goog.exportSymbol('proto.cashback.CashbackActions', null, global);
|
|
24
25
|
goog.exportSymbol('proto.cashback.CashbackConfigItem', null, global);
|
|
25
26
|
goog.exportSymbol('proto.cashback.CashbackConfigRequest', null, global);
|
|
26
27
|
goog.exportSymbol('proto.cashback.CashbackItem', null, global);
|
|
@@ -31,6 +32,8 @@ goog.exportSymbol('proto.cashback.CashbackRequest.RequestCase', null, global);
|
|
|
31
32
|
goog.exportSymbol('proto.cashback.CashbackResponse', null, global);
|
|
32
33
|
goog.exportSymbol('proto.cashback.CashbackStatusResponse', null, global);
|
|
33
34
|
goog.exportSymbol('proto.cashback.CashbackUserRequest', null, global);
|
|
35
|
+
goog.exportSymbol('proto.cashback.ClaimCashbackRequest', null, global);
|
|
36
|
+
goog.exportSymbol('proto.cashback.ClaimCashbackResponse', null, global);
|
|
34
37
|
goog.exportSymbol('proto.cashback.File', null, global);
|
|
35
38
|
goog.exportSymbol('proto.cashback.GetCashbackRequest', null, global);
|
|
36
39
|
goog.exportSymbol('proto.cashback.GetFileRequest', null, global);
|
|
@@ -399,6 +402,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
399
402
|
*/
|
|
400
403
|
proto.cashback.CashbackConfigItem.displayName = 'proto.cashback.CashbackConfigItem';
|
|
401
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* Generated by JsPbCodeGenerator.
|
|
407
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
408
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
409
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
410
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
411
|
+
* valid.
|
|
412
|
+
* @extends {jspb.Message}
|
|
413
|
+
* @constructor
|
|
414
|
+
*/
|
|
415
|
+
proto.cashback.CashbackActions = function(opt_data) {
|
|
416
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
417
|
+
};
|
|
418
|
+
goog.inherits(proto.cashback.CashbackActions, jspb.Message);
|
|
419
|
+
if (goog.DEBUG && !COMPILED) {
|
|
420
|
+
/**
|
|
421
|
+
* @public
|
|
422
|
+
* @override
|
|
423
|
+
*/
|
|
424
|
+
proto.cashback.CashbackActions.displayName = 'proto.cashback.CashbackActions';
|
|
425
|
+
}
|
|
402
426
|
/**
|
|
403
427
|
* Generated by JsPbCodeGenerator.
|
|
404
428
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -462,6 +486,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
462
486
|
*/
|
|
463
487
|
proto.cashback.UserCashbackItemsResponse.displayName = 'proto.cashback.UserCashbackItemsResponse';
|
|
464
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* Generated by JsPbCodeGenerator.
|
|
491
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
492
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
493
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
494
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
495
|
+
* valid.
|
|
496
|
+
* @extends {jspb.Message}
|
|
497
|
+
* @constructor
|
|
498
|
+
*/
|
|
499
|
+
proto.cashback.ClaimCashbackRequest = function(opt_data) {
|
|
500
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
501
|
+
};
|
|
502
|
+
goog.inherits(proto.cashback.ClaimCashbackRequest, jspb.Message);
|
|
503
|
+
if (goog.DEBUG && !COMPILED) {
|
|
504
|
+
/**
|
|
505
|
+
* @public
|
|
506
|
+
* @override
|
|
507
|
+
*/
|
|
508
|
+
proto.cashback.ClaimCashbackRequest.displayName = 'proto.cashback.ClaimCashbackRequest';
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Generated by JsPbCodeGenerator.
|
|
512
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
513
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
514
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
515
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
516
|
+
* valid.
|
|
517
|
+
* @extends {jspb.Message}
|
|
518
|
+
* @constructor
|
|
519
|
+
*/
|
|
520
|
+
proto.cashback.ClaimCashbackResponse = function(opt_data) {
|
|
521
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
522
|
+
};
|
|
523
|
+
goog.inherits(proto.cashback.ClaimCashbackResponse, jspb.Message);
|
|
524
|
+
if (goog.DEBUG && !COMPILED) {
|
|
525
|
+
/**
|
|
526
|
+
* @public
|
|
527
|
+
* @override
|
|
528
|
+
*/
|
|
529
|
+
proto.cashback.ClaimCashbackResponse.displayName = 'proto.cashback.ClaimCashbackResponse';
|
|
530
|
+
}
|
|
465
531
|
|
|
466
532
|
|
|
467
533
|
|
|
@@ -4762,6 +4828,196 @@ proto.cashback.CashbackConfigItem.prototype.hasPercentage = function() {
|
|
|
4762
4828
|
|
|
4763
4829
|
|
|
4764
4830
|
|
|
4831
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4832
|
+
/**
|
|
4833
|
+
* Creates an object representation of this proto.
|
|
4834
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
4835
|
+
* Optional fields that are not set will be set to undefined.
|
|
4836
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
4837
|
+
* For the list of reserved names please see:
|
|
4838
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
4839
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
4840
|
+
* JSPB instance for transitional soy proto support:
|
|
4841
|
+
* http://goto/soy-param-migration
|
|
4842
|
+
* @return {!Object}
|
|
4843
|
+
*/
|
|
4844
|
+
proto.cashback.CashbackActions.prototype.toObject = function(opt_includeInstance) {
|
|
4845
|
+
return proto.cashback.CashbackActions.toObject(opt_includeInstance, this);
|
|
4846
|
+
};
|
|
4847
|
+
|
|
4848
|
+
|
|
4849
|
+
/**
|
|
4850
|
+
* Static version of the {@see toObject} method.
|
|
4851
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
4852
|
+
* the JSPB instance for transitional soy proto support:
|
|
4853
|
+
* http://goto/soy-param-migration
|
|
4854
|
+
* @param {!proto.cashback.CashbackActions} msg The msg instance to transform.
|
|
4855
|
+
* @return {!Object}
|
|
4856
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
4857
|
+
*/
|
|
4858
|
+
proto.cashback.CashbackActions.toObject = function(includeInstance, msg) {
|
|
4859
|
+
var f, obj = {
|
|
4860
|
+
canClaim: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
4861
|
+
canReactivate: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
|
|
4862
|
+
canCalculate: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
|
|
4863
|
+
};
|
|
4864
|
+
|
|
4865
|
+
if (includeInstance) {
|
|
4866
|
+
obj.$jspbMessageInstance = msg;
|
|
4867
|
+
}
|
|
4868
|
+
return obj;
|
|
4869
|
+
};
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4872
|
+
|
|
4873
|
+
/**
|
|
4874
|
+
* Deserializes binary data (in protobuf wire format).
|
|
4875
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
4876
|
+
* @return {!proto.cashback.CashbackActions}
|
|
4877
|
+
*/
|
|
4878
|
+
proto.cashback.CashbackActions.deserializeBinary = function(bytes) {
|
|
4879
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
4880
|
+
var msg = new proto.cashback.CashbackActions;
|
|
4881
|
+
return proto.cashback.CashbackActions.deserializeBinaryFromReader(msg, reader);
|
|
4882
|
+
};
|
|
4883
|
+
|
|
4884
|
+
|
|
4885
|
+
/**
|
|
4886
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
4887
|
+
* given reader into the given message object.
|
|
4888
|
+
* @param {!proto.cashback.CashbackActions} msg The message object to deserialize into.
|
|
4889
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
4890
|
+
* @return {!proto.cashback.CashbackActions}
|
|
4891
|
+
*/
|
|
4892
|
+
proto.cashback.CashbackActions.deserializeBinaryFromReader = function(msg, reader) {
|
|
4893
|
+
while (reader.nextField()) {
|
|
4894
|
+
if (reader.isEndGroup()) {
|
|
4895
|
+
break;
|
|
4896
|
+
}
|
|
4897
|
+
var field = reader.getFieldNumber();
|
|
4898
|
+
switch (field) {
|
|
4899
|
+
case 1:
|
|
4900
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
4901
|
+
msg.setCanClaim(value);
|
|
4902
|
+
break;
|
|
4903
|
+
case 2:
|
|
4904
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
4905
|
+
msg.setCanReactivate(value);
|
|
4906
|
+
break;
|
|
4907
|
+
case 3:
|
|
4908
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
|
4909
|
+
msg.setCanCalculate(value);
|
|
4910
|
+
break;
|
|
4911
|
+
default:
|
|
4912
|
+
reader.skipField();
|
|
4913
|
+
break;
|
|
4914
|
+
}
|
|
4915
|
+
}
|
|
4916
|
+
return msg;
|
|
4917
|
+
};
|
|
4918
|
+
|
|
4919
|
+
|
|
4920
|
+
/**
|
|
4921
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
4922
|
+
* @return {!Uint8Array}
|
|
4923
|
+
*/
|
|
4924
|
+
proto.cashback.CashbackActions.prototype.serializeBinary = function() {
|
|
4925
|
+
var writer = new jspb.BinaryWriter();
|
|
4926
|
+
proto.cashback.CashbackActions.serializeBinaryToWriter(this, writer);
|
|
4927
|
+
return writer.getResultBuffer();
|
|
4928
|
+
};
|
|
4929
|
+
|
|
4930
|
+
|
|
4931
|
+
/**
|
|
4932
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
4933
|
+
* format), writing to the given BinaryWriter.
|
|
4934
|
+
* @param {!proto.cashback.CashbackActions} message
|
|
4935
|
+
* @param {!jspb.BinaryWriter} writer
|
|
4936
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
4937
|
+
*/
|
|
4938
|
+
proto.cashback.CashbackActions.serializeBinaryToWriter = function(message, writer) {
|
|
4939
|
+
var f = undefined;
|
|
4940
|
+
f = message.getCanClaim();
|
|
4941
|
+
if (f) {
|
|
4942
|
+
writer.writeBool(
|
|
4943
|
+
1,
|
|
4944
|
+
f
|
|
4945
|
+
);
|
|
4946
|
+
}
|
|
4947
|
+
f = message.getCanReactivate();
|
|
4948
|
+
if (f) {
|
|
4949
|
+
writer.writeBool(
|
|
4950
|
+
2,
|
|
4951
|
+
f
|
|
4952
|
+
);
|
|
4953
|
+
}
|
|
4954
|
+
f = message.getCanCalculate();
|
|
4955
|
+
if (f) {
|
|
4956
|
+
writer.writeBool(
|
|
4957
|
+
3,
|
|
4958
|
+
f
|
|
4959
|
+
);
|
|
4960
|
+
}
|
|
4961
|
+
};
|
|
4962
|
+
|
|
4963
|
+
|
|
4964
|
+
/**
|
|
4965
|
+
* optional bool can_claim = 1;
|
|
4966
|
+
* @return {boolean}
|
|
4967
|
+
*/
|
|
4968
|
+
proto.cashback.CashbackActions.prototype.getCanClaim = function() {
|
|
4969
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
|
|
4970
|
+
};
|
|
4971
|
+
|
|
4972
|
+
|
|
4973
|
+
/**
|
|
4974
|
+
* @param {boolean} value
|
|
4975
|
+
* @return {!proto.cashback.CashbackActions} returns this
|
|
4976
|
+
*/
|
|
4977
|
+
proto.cashback.CashbackActions.prototype.setCanClaim = function(value) {
|
|
4978
|
+
return jspb.Message.setProto3BooleanField(this, 1, value);
|
|
4979
|
+
};
|
|
4980
|
+
|
|
4981
|
+
|
|
4982
|
+
/**
|
|
4983
|
+
* optional bool can_reactivate = 2;
|
|
4984
|
+
* @return {boolean}
|
|
4985
|
+
*/
|
|
4986
|
+
proto.cashback.CashbackActions.prototype.getCanReactivate = function() {
|
|
4987
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
|
|
4988
|
+
};
|
|
4989
|
+
|
|
4990
|
+
|
|
4991
|
+
/**
|
|
4992
|
+
* @param {boolean} value
|
|
4993
|
+
* @return {!proto.cashback.CashbackActions} returns this
|
|
4994
|
+
*/
|
|
4995
|
+
proto.cashback.CashbackActions.prototype.setCanReactivate = function(value) {
|
|
4996
|
+
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
4997
|
+
};
|
|
4998
|
+
|
|
4999
|
+
|
|
5000
|
+
/**
|
|
5001
|
+
* optional bool can_calculate = 3;
|
|
5002
|
+
* @return {boolean}
|
|
5003
|
+
*/
|
|
5004
|
+
proto.cashback.CashbackActions.prototype.getCanCalculate = function() {
|
|
5005
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
|
5006
|
+
};
|
|
5007
|
+
|
|
5008
|
+
|
|
5009
|
+
/**
|
|
5010
|
+
* @param {boolean} value
|
|
5011
|
+
* @return {!proto.cashback.CashbackActions} returns this
|
|
5012
|
+
*/
|
|
5013
|
+
proto.cashback.CashbackActions.prototype.setCanCalculate = function(value) {
|
|
5014
|
+
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
5015
|
+
};
|
|
5016
|
+
|
|
5017
|
+
|
|
5018
|
+
|
|
5019
|
+
|
|
5020
|
+
|
|
4765
5021
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
4766
5022
|
/**
|
|
4767
5023
|
* Creates an object representation of this proto.
|
|
@@ -4803,7 +5059,11 @@ proto.cashback.UserCashbackItem.toObject = function(includeInstance, msg) {
|
|
|
4803
5059
|
calculatedDate: jspb.Message.getFieldWithDefault(msg, 10, ""),
|
|
4804
5060
|
image: jspb.Message.getFieldWithDefault(msg, 11, ""),
|
|
4805
5061
|
status: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
|
4806
|
-
reward: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0)
|
|
5062
|
+
reward: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0),
|
|
5063
|
+
actions: (f = msg.getActions()) && proto.cashback.CashbackActions.toObject(includeInstance, f),
|
|
5064
|
+
remainingMs: jspb.Message.getFieldWithDefault(msg, 15, 0),
|
|
5065
|
+
remainingToMin: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0),
|
|
5066
|
+
cashbackUserId: jspb.Message.getFieldWithDefault(msg, 17, 0)
|
|
4807
5067
|
};
|
|
4808
5068
|
|
|
4809
5069
|
if (includeInstance) {
|
|
@@ -4892,6 +5152,23 @@ proto.cashback.UserCashbackItem.deserializeBinaryFromReader = function(msg, read
|
|
|
4892
5152
|
var value = /** @type {number} */ (reader.readFloat());
|
|
4893
5153
|
msg.setReward(value);
|
|
4894
5154
|
break;
|
|
5155
|
+
case 14:
|
|
5156
|
+
var value = new proto.cashback.CashbackActions;
|
|
5157
|
+
reader.readMessage(value,proto.cashback.CashbackActions.deserializeBinaryFromReader);
|
|
5158
|
+
msg.setActions(value);
|
|
5159
|
+
break;
|
|
5160
|
+
case 15:
|
|
5161
|
+
var value = /** @type {number} */ (reader.readInt64());
|
|
5162
|
+
msg.setRemainingMs(value);
|
|
5163
|
+
break;
|
|
5164
|
+
case 16:
|
|
5165
|
+
var value = /** @type {number} */ (reader.readFloat());
|
|
5166
|
+
msg.setRemainingToMin(value);
|
|
5167
|
+
break;
|
|
5168
|
+
case 17:
|
|
5169
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
5170
|
+
msg.setCashbackUserId(value);
|
|
5171
|
+
break;
|
|
4895
5172
|
default:
|
|
4896
5173
|
reader.skipField();
|
|
4897
5174
|
break;
|
|
@@ -5012,6 +5289,35 @@ proto.cashback.UserCashbackItem.serializeBinaryToWriter = function(message, writ
|
|
|
5012
5289
|
f
|
|
5013
5290
|
);
|
|
5014
5291
|
}
|
|
5292
|
+
f = message.getActions();
|
|
5293
|
+
if (f != null) {
|
|
5294
|
+
writer.writeMessage(
|
|
5295
|
+
14,
|
|
5296
|
+
f,
|
|
5297
|
+
proto.cashback.CashbackActions.serializeBinaryToWriter
|
|
5298
|
+
);
|
|
5299
|
+
}
|
|
5300
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 15));
|
|
5301
|
+
if (f != null) {
|
|
5302
|
+
writer.writeInt64(
|
|
5303
|
+
15,
|
|
5304
|
+
f
|
|
5305
|
+
);
|
|
5306
|
+
}
|
|
5307
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 16));
|
|
5308
|
+
if (f != null) {
|
|
5309
|
+
writer.writeFloat(
|
|
5310
|
+
16,
|
|
5311
|
+
f
|
|
5312
|
+
);
|
|
5313
|
+
}
|
|
5314
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 17));
|
|
5315
|
+
if (f != null) {
|
|
5316
|
+
writer.writeInt32(
|
|
5317
|
+
17,
|
|
5318
|
+
f
|
|
5319
|
+
);
|
|
5320
|
+
}
|
|
5015
5321
|
};
|
|
5016
5322
|
|
|
5017
5323
|
|
|
@@ -5375,49 +5681,194 @@ proto.cashback.UserCashbackItem.prototype.hasReward = function() {
|
|
|
5375
5681
|
};
|
|
5376
5682
|
|
|
5377
5683
|
|
|
5684
|
+
/**
|
|
5685
|
+
* optional CashbackActions actions = 14;
|
|
5686
|
+
* @return {?proto.cashback.CashbackActions}
|
|
5687
|
+
*/
|
|
5688
|
+
proto.cashback.UserCashbackItem.prototype.getActions = function() {
|
|
5689
|
+
return /** @type{?proto.cashback.CashbackActions} */ (
|
|
5690
|
+
jspb.Message.getWrapperField(this, proto.cashback.CashbackActions, 14));
|
|
5691
|
+
};
|
|
5378
5692
|
|
|
5379
5693
|
|
|
5380
|
-
|
|
5381
|
-
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5382
5694
|
/**
|
|
5383
|
-
*
|
|
5384
|
-
*
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
5389
|
-
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
5390
|
-
* JSPB instance for transitional soy proto support:
|
|
5391
|
-
* http://goto/soy-param-migration
|
|
5392
|
-
* @return {!Object}
|
|
5393
|
-
*/
|
|
5394
|
-
proto.cashback.CashbackUserRequest.prototype.toObject = function(opt_includeInstance) {
|
|
5395
|
-
return proto.cashback.CashbackUserRequest.toObject(opt_includeInstance, this);
|
|
5695
|
+
* @param {?proto.cashback.CashbackActions|undefined} value
|
|
5696
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5697
|
+
*/
|
|
5698
|
+
proto.cashback.UserCashbackItem.prototype.setActions = function(value) {
|
|
5699
|
+
return jspb.Message.setWrapperField(this, 14, value);
|
|
5396
5700
|
};
|
|
5397
5701
|
|
|
5398
5702
|
|
|
5399
5703
|
/**
|
|
5400
|
-
*
|
|
5401
|
-
* @
|
|
5402
|
-
* the JSPB instance for transitional soy proto support:
|
|
5403
|
-
* http://goto/soy-param-migration
|
|
5404
|
-
* @param {!proto.cashback.CashbackUserRequest} msg The msg instance to transform.
|
|
5405
|
-
* @return {!Object}
|
|
5406
|
-
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
5704
|
+
* Clears the message field making it undefined.
|
|
5705
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5407
5706
|
*/
|
|
5408
|
-
proto.cashback.
|
|
5409
|
-
|
|
5410
|
-
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
5411
|
-
cashbackType: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
5412
|
-
currency: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
5413
|
-
};
|
|
5414
|
-
|
|
5415
|
-
if (includeInstance) {
|
|
5416
|
-
obj.$jspbMessageInstance = msg;
|
|
5417
|
-
}
|
|
5418
|
-
return obj;
|
|
5707
|
+
proto.cashback.UserCashbackItem.prototype.clearActions = function() {
|
|
5708
|
+
return this.setActions(undefined);
|
|
5419
5709
|
};
|
|
5420
|
-
|
|
5710
|
+
|
|
5711
|
+
|
|
5712
|
+
/**
|
|
5713
|
+
* Returns whether this field is set.
|
|
5714
|
+
* @return {boolean}
|
|
5715
|
+
*/
|
|
5716
|
+
proto.cashback.UserCashbackItem.prototype.hasActions = function() {
|
|
5717
|
+
return jspb.Message.getField(this, 14) != null;
|
|
5718
|
+
};
|
|
5719
|
+
|
|
5720
|
+
|
|
5721
|
+
/**
|
|
5722
|
+
* optional int64 remaining_ms = 15;
|
|
5723
|
+
* @return {number}
|
|
5724
|
+
*/
|
|
5725
|
+
proto.cashback.UserCashbackItem.prototype.getRemainingMs = function() {
|
|
5726
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));
|
|
5727
|
+
};
|
|
5728
|
+
|
|
5729
|
+
|
|
5730
|
+
/**
|
|
5731
|
+
* @param {number} value
|
|
5732
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5733
|
+
*/
|
|
5734
|
+
proto.cashback.UserCashbackItem.prototype.setRemainingMs = function(value) {
|
|
5735
|
+
return jspb.Message.setField(this, 15, value);
|
|
5736
|
+
};
|
|
5737
|
+
|
|
5738
|
+
|
|
5739
|
+
/**
|
|
5740
|
+
* Clears the field making it undefined.
|
|
5741
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5742
|
+
*/
|
|
5743
|
+
proto.cashback.UserCashbackItem.prototype.clearRemainingMs = function() {
|
|
5744
|
+
return jspb.Message.setField(this, 15, undefined);
|
|
5745
|
+
};
|
|
5746
|
+
|
|
5747
|
+
|
|
5748
|
+
/**
|
|
5749
|
+
* Returns whether this field is set.
|
|
5750
|
+
* @return {boolean}
|
|
5751
|
+
*/
|
|
5752
|
+
proto.cashback.UserCashbackItem.prototype.hasRemainingMs = function() {
|
|
5753
|
+
return jspb.Message.getField(this, 15) != null;
|
|
5754
|
+
};
|
|
5755
|
+
|
|
5756
|
+
|
|
5757
|
+
/**
|
|
5758
|
+
* optional float remaining_to_min = 16;
|
|
5759
|
+
* @return {number}
|
|
5760
|
+
*/
|
|
5761
|
+
proto.cashback.UserCashbackItem.prototype.getRemainingToMin = function() {
|
|
5762
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 16, 0.0));
|
|
5763
|
+
};
|
|
5764
|
+
|
|
5765
|
+
|
|
5766
|
+
/**
|
|
5767
|
+
* @param {number} value
|
|
5768
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5769
|
+
*/
|
|
5770
|
+
proto.cashback.UserCashbackItem.prototype.setRemainingToMin = function(value) {
|
|
5771
|
+
return jspb.Message.setField(this, 16, value);
|
|
5772
|
+
};
|
|
5773
|
+
|
|
5774
|
+
|
|
5775
|
+
/**
|
|
5776
|
+
* Clears the field making it undefined.
|
|
5777
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5778
|
+
*/
|
|
5779
|
+
proto.cashback.UserCashbackItem.prototype.clearRemainingToMin = function() {
|
|
5780
|
+
return jspb.Message.setField(this, 16, undefined);
|
|
5781
|
+
};
|
|
5782
|
+
|
|
5783
|
+
|
|
5784
|
+
/**
|
|
5785
|
+
* Returns whether this field is set.
|
|
5786
|
+
* @return {boolean}
|
|
5787
|
+
*/
|
|
5788
|
+
proto.cashback.UserCashbackItem.prototype.hasRemainingToMin = function() {
|
|
5789
|
+
return jspb.Message.getField(this, 16) != null;
|
|
5790
|
+
};
|
|
5791
|
+
|
|
5792
|
+
|
|
5793
|
+
/**
|
|
5794
|
+
* optional int32 cashback_user_id = 17;
|
|
5795
|
+
* @return {number}
|
|
5796
|
+
*/
|
|
5797
|
+
proto.cashback.UserCashbackItem.prototype.getCashbackUserId = function() {
|
|
5798
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
|
|
5799
|
+
};
|
|
5800
|
+
|
|
5801
|
+
|
|
5802
|
+
/**
|
|
5803
|
+
* @param {number} value
|
|
5804
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5805
|
+
*/
|
|
5806
|
+
proto.cashback.UserCashbackItem.prototype.setCashbackUserId = function(value) {
|
|
5807
|
+
return jspb.Message.setField(this, 17, value);
|
|
5808
|
+
};
|
|
5809
|
+
|
|
5810
|
+
|
|
5811
|
+
/**
|
|
5812
|
+
* Clears the field making it undefined.
|
|
5813
|
+
* @return {!proto.cashback.UserCashbackItem} returns this
|
|
5814
|
+
*/
|
|
5815
|
+
proto.cashback.UserCashbackItem.prototype.clearCashbackUserId = function() {
|
|
5816
|
+
return jspb.Message.setField(this, 17, undefined);
|
|
5817
|
+
};
|
|
5818
|
+
|
|
5819
|
+
|
|
5820
|
+
/**
|
|
5821
|
+
* Returns whether this field is set.
|
|
5822
|
+
* @return {boolean}
|
|
5823
|
+
*/
|
|
5824
|
+
proto.cashback.UserCashbackItem.prototype.hasCashbackUserId = function() {
|
|
5825
|
+
return jspb.Message.getField(this, 17) != null;
|
|
5826
|
+
};
|
|
5827
|
+
|
|
5828
|
+
|
|
5829
|
+
|
|
5830
|
+
|
|
5831
|
+
|
|
5832
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
5833
|
+
/**
|
|
5834
|
+
* Creates an object representation of this proto.
|
|
5835
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
5836
|
+
* Optional fields that are not set will be set to undefined.
|
|
5837
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
5838
|
+
* For the list of reserved names please see:
|
|
5839
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
5840
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
5841
|
+
* JSPB instance for transitional soy proto support:
|
|
5842
|
+
* http://goto/soy-param-migration
|
|
5843
|
+
* @return {!Object}
|
|
5844
|
+
*/
|
|
5845
|
+
proto.cashback.CashbackUserRequest.prototype.toObject = function(opt_includeInstance) {
|
|
5846
|
+
return proto.cashback.CashbackUserRequest.toObject(opt_includeInstance, this);
|
|
5847
|
+
};
|
|
5848
|
+
|
|
5849
|
+
|
|
5850
|
+
/**
|
|
5851
|
+
* Static version of the {@see toObject} method.
|
|
5852
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
5853
|
+
* the JSPB instance for transitional soy proto support:
|
|
5854
|
+
* http://goto/soy-param-migration
|
|
5855
|
+
* @param {!proto.cashback.CashbackUserRequest} msg The msg instance to transform.
|
|
5856
|
+
* @return {!Object}
|
|
5857
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
5858
|
+
*/
|
|
5859
|
+
proto.cashback.CashbackUserRequest.toObject = function(includeInstance, msg) {
|
|
5860
|
+
var f, obj = {
|
|
5861
|
+
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
5862
|
+
cashbackType: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
5863
|
+
currency: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
5864
|
+
};
|
|
5865
|
+
|
|
5866
|
+
if (includeInstance) {
|
|
5867
|
+
obj.$jspbMessageInstance = msg;
|
|
5868
|
+
}
|
|
5869
|
+
return obj;
|
|
5870
|
+
};
|
|
5871
|
+
}
|
|
5421
5872
|
|
|
5422
5873
|
|
|
5423
5874
|
/**
|
|
@@ -5857,4 +6308,342 @@ proto.cashback.UserCashbackItemsResponse.prototype.hasTotalItems = function() {
|
|
|
5857
6308
|
};
|
|
5858
6309
|
|
|
5859
6310
|
|
|
6311
|
+
|
|
6312
|
+
|
|
6313
|
+
|
|
6314
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6315
|
+
/**
|
|
6316
|
+
* Creates an object representation of this proto.
|
|
6317
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
6318
|
+
* Optional fields that are not set will be set to undefined.
|
|
6319
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
6320
|
+
* For the list of reserved names please see:
|
|
6321
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
6322
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
6323
|
+
* JSPB instance for transitional soy proto support:
|
|
6324
|
+
* http://goto/soy-param-migration
|
|
6325
|
+
* @return {!Object}
|
|
6326
|
+
*/
|
|
6327
|
+
proto.cashback.ClaimCashbackRequest.prototype.toObject = function(opt_includeInstance) {
|
|
6328
|
+
return proto.cashback.ClaimCashbackRequest.toObject(opt_includeInstance, this);
|
|
6329
|
+
};
|
|
6330
|
+
|
|
6331
|
+
|
|
6332
|
+
/**
|
|
6333
|
+
* Static version of the {@see toObject} method.
|
|
6334
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
6335
|
+
* the JSPB instance for transitional soy proto support:
|
|
6336
|
+
* http://goto/soy-param-migration
|
|
6337
|
+
* @param {!proto.cashback.ClaimCashbackRequest} msg The msg instance to transform.
|
|
6338
|
+
* @return {!Object}
|
|
6339
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
6340
|
+
*/
|
|
6341
|
+
proto.cashback.ClaimCashbackRequest.toObject = function(includeInstance, msg) {
|
|
6342
|
+
var f, obj = {
|
|
6343
|
+
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
6344
|
+
cashbackUserId: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
6345
|
+
currency: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
6346
|
+
};
|
|
6347
|
+
|
|
6348
|
+
if (includeInstance) {
|
|
6349
|
+
obj.$jspbMessageInstance = msg;
|
|
6350
|
+
}
|
|
6351
|
+
return obj;
|
|
6352
|
+
};
|
|
6353
|
+
}
|
|
6354
|
+
|
|
6355
|
+
|
|
6356
|
+
/**
|
|
6357
|
+
* Deserializes binary data (in protobuf wire format).
|
|
6358
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
6359
|
+
* @return {!proto.cashback.ClaimCashbackRequest}
|
|
6360
|
+
*/
|
|
6361
|
+
proto.cashback.ClaimCashbackRequest.deserializeBinary = function(bytes) {
|
|
6362
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
6363
|
+
var msg = new proto.cashback.ClaimCashbackRequest;
|
|
6364
|
+
return proto.cashback.ClaimCashbackRequest.deserializeBinaryFromReader(msg, reader);
|
|
6365
|
+
};
|
|
6366
|
+
|
|
6367
|
+
|
|
6368
|
+
/**
|
|
6369
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
6370
|
+
* given reader into the given message object.
|
|
6371
|
+
* @param {!proto.cashback.ClaimCashbackRequest} msg The message object to deserialize into.
|
|
6372
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
6373
|
+
* @return {!proto.cashback.ClaimCashbackRequest}
|
|
6374
|
+
*/
|
|
6375
|
+
proto.cashback.ClaimCashbackRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
6376
|
+
while (reader.nextField()) {
|
|
6377
|
+
if (reader.isEndGroup()) {
|
|
6378
|
+
break;
|
|
6379
|
+
}
|
|
6380
|
+
var field = reader.getFieldNumber();
|
|
6381
|
+
switch (field) {
|
|
6382
|
+
case 1:
|
|
6383
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
6384
|
+
msg.setUserId(value);
|
|
6385
|
+
break;
|
|
6386
|
+
case 2:
|
|
6387
|
+
var value = /** @type {number} */ (reader.readInt32());
|
|
6388
|
+
msg.setCashbackUserId(value);
|
|
6389
|
+
break;
|
|
6390
|
+
case 3:
|
|
6391
|
+
var value = /** @type {string} */ (reader.readString());
|
|
6392
|
+
msg.setCurrency(value);
|
|
6393
|
+
break;
|
|
6394
|
+
default:
|
|
6395
|
+
reader.skipField();
|
|
6396
|
+
break;
|
|
6397
|
+
}
|
|
6398
|
+
}
|
|
6399
|
+
return msg;
|
|
6400
|
+
};
|
|
6401
|
+
|
|
6402
|
+
|
|
6403
|
+
/**
|
|
6404
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
6405
|
+
* @return {!Uint8Array}
|
|
6406
|
+
*/
|
|
6407
|
+
proto.cashback.ClaimCashbackRequest.prototype.serializeBinary = function() {
|
|
6408
|
+
var writer = new jspb.BinaryWriter();
|
|
6409
|
+
proto.cashback.ClaimCashbackRequest.serializeBinaryToWriter(this, writer);
|
|
6410
|
+
return writer.getResultBuffer();
|
|
6411
|
+
};
|
|
6412
|
+
|
|
6413
|
+
|
|
6414
|
+
/**
|
|
6415
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
6416
|
+
* format), writing to the given BinaryWriter.
|
|
6417
|
+
* @param {!proto.cashback.ClaimCashbackRequest} message
|
|
6418
|
+
* @param {!jspb.BinaryWriter} writer
|
|
6419
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
6420
|
+
*/
|
|
6421
|
+
proto.cashback.ClaimCashbackRequest.serializeBinaryToWriter = function(message, writer) {
|
|
6422
|
+
var f = undefined;
|
|
6423
|
+
f = message.getUserId();
|
|
6424
|
+
if (f !== 0) {
|
|
6425
|
+
writer.writeInt32(
|
|
6426
|
+
1,
|
|
6427
|
+
f
|
|
6428
|
+
);
|
|
6429
|
+
}
|
|
6430
|
+
f = message.getCashbackUserId();
|
|
6431
|
+
if (f !== 0) {
|
|
6432
|
+
writer.writeInt32(
|
|
6433
|
+
2,
|
|
6434
|
+
f
|
|
6435
|
+
);
|
|
6436
|
+
}
|
|
6437
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 3));
|
|
6438
|
+
if (f != null) {
|
|
6439
|
+
writer.writeString(
|
|
6440
|
+
3,
|
|
6441
|
+
f
|
|
6442
|
+
);
|
|
6443
|
+
}
|
|
6444
|
+
};
|
|
6445
|
+
|
|
6446
|
+
|
|
6447
|
+
/**
|
|
6448
|
+
* optional int32 user_id = 1;
|
|
6449
|
+
* @return {number}
|
|
6450
|
+
*/
|
|
6451
|
+
proto.cashback.ClaimCashbackRequest.prototype.getUserId = function() {
|
|
6452
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
6453
|
+
};
|
|
6454
|
+
|
|
6455
|
+
|
|
6456
|
+
/**
|
|
6457
|
+
* @param {number} value
|
|
6458
|
+
* @return {!proto.cashback.ClaimCashbackRequest} returns this
|
|
6459
|
+
*/
|
|
6460
|
+
proto.cashback.ClaimCashbackRequest.prototype.setUserId = function(value) {
|
|
6461
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
|
6462
|
+
};
|
|
6463
|
+
|
|
6464
|
+
|
|
6465
|
+
/**
|
|
6466
|
+
* optional int32 cashback_user_id = 2;
|
|
6467
|
+
* @return {number}
|
|
6468
|
+
*/
|
|
6469
|
+
proto.cashback.ClaimCashbackRequest.prototype.getCashbackUserId = function() {
|
|
6470
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
6471
|
+
};
|
|
6472
|
+
|
|
6473
|
+
|
|
6474
|
+
/**
|
|
6475
|
+
* @param {number} value
|
|
6476
|
+
* @return {!proto.cashback.ClaimCashbackRequest} returns this
|
|
6477
|
+
*/
|
|
6478
|
+
proto.cashback.ClaimCashbackRequest.prototype.setCashbackUserId = function(value) {
|
|
6479
|
+
return jspb.Message.setProto3IntField(this, 2, value);
|
|
6480
|
+
};
|
|
6481
|
+
|
|
6482
|
+
|
|
6483
|
+
/**
|
|
6484
|
+
* optional string currency = 3;
|
|
6485
|
+
* @return {string}
|
|
6486
|
+
*/
|
|
6487
|
+
proto.cashback.ClaimCashbackRequest.prototype.getCurrency = function() {
|
|
6488
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
6489
|
+
};
|
|
6490
|
+
|
|
6491
|
+
|
|
6492
|
+
/**
|
|
6493
|
+
* @param {string} value
|
|
6494
|
+
* @return {!proto.cashback.ClaimCashbackRequest} returns this
|
|
6495
|
+
*/
|
|
6496
|
+
proto.cashback.ClaimCashbackRequest.prototype.setCurrency = function(value) {
|
|
6497
|
+
return jspb.Message.setField(this, 3, value);
|
|
6498
|
+
};
|
|
6499
|
+
|
|
6500
|
+
|
|
6501
|
+
/**
|
|
6502
|
+
* Clears the field making it undefined.
|
|
6503
|
+
* @return {!proto.cashback.ClaimCashbackRequest} returns this
|
|
6504
|
+
*/
|
|
6505
|
+
proto.cashback.ClaimCashbackRequest.prototype.clearCurrency = function() {
|
|
6506
|
+
return jspb.Message.setField(this, 3, undefined);
|
|
6507
|
+
};
|
|
6508
|
+
|
|
6509
|
+
|
|
6510
|
+
/**
|
|
6511
|
+
* Returns whether this field is set.
|
|
6512
|
+
* @return {boolean}
|
|
6513
|
+
*/
|
|
6514
|
+
proto.cashback.ClaimCashbackRequest.prototype.hasCurrency = function() {
|
|
6515
|
+
return jspb.Message.getField(this, 3) != null;
|
|
6516
|
+
};
|
|
6517
|
+
|
|
6518
|
+
|
|
6519
|
+
|
|
6520
|
+
|
|
6521
|
+
|
|
6522
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
6523
|
+
/**
|
|
6524
|
+
* Creates an object representation of this proto.
|
|
6525
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
6526
|
+
* Optional fields that are not set will be set to undefined.
|
|
6527
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
6528
|
+
* For the list of reserved names please see:
|
|
6529
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
6530
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
6531
|
+
* JSPB instance for transitional soy proto support:
|
|
6532
|
+
* http://goto/soy-param-migration
|
|
6533
|
+
* @return {!Object}
|
|
6534
|
+
*/
|
|
6535
|
+
proto.cashback.ClaimCashbackResponse.prototype.toObject = function(opt_includeInstance) {
|
|
6536
|
+
return proto.cashback.ClaimCashbackResponse.toObject(opt_includeInstance, this);
|
|
6537
|
+
};
|
|
6538
|
+
|
|
6539
|
+
|
|
6540
|
+
/**
|
|
6541
|
+
* Static version of the {@see toObject} method.
|
|
6542
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
6543
|
+
* the JSPB instance for transitional soy proto support:
|
|
6544
|
+
* http://goto/soy-param-migration
|
|
6545
|
+
* @param {!proto.cashback.ClaimCashbackResponse} msg The msg instance to transform.
|
|
6546
|
+
* @return {!Object}
|
|
6547
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
6548
|
+
*/
|
|
6549
|
+
proto.cashback.ClaimCashbackResponse.toObject = function(includeInstance, msg) {
|
|
6550
|
+
var f, obj = {
|
|
6551
|
+
status: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
6552
|
+
};
|
|
6553
|
+
|
|
6554
|
+
if (includeInstance) {
|
|
6555
|
+
obj.$jspbMessageInstance = msg;
|
|
6556
|
+
}
|
|
6557
|
+
return obj;
|
|
6558
|
+
};
|
|
6559
|
+
}
|
|
6560
|
+
|
|
6561
|
+
|
|
6562
|
+
/**
|
|
6563
|
+
* Deserializes binary data (in protobuf wire format).
|
|
6564
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
6565
|
+
* @return {!proto.cashback.ClaimCashbackResponse}
|
|
6566
|
+
*/
|
|
6567
|
+
proto.cashback.ClaimCashbackResponse.deserializeBinary = function(bytes) {
|
|
6568
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
6569
|
+
var msg = new proto.cashback.ClaimCashbackResponse;
|
|
6570
|
+
return proto.cashback.ClaimCashbackResponse.deserializeBinaryFromReader(msg, reader);
|
|
6571
|
+
};
|
|
6572
|
+
|
|
6573
|
+
|
|
6574
|
+
/**
|
|
6575
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
6576
|
+
* given reader into the given message object.
|
|
6577
|
+
* @param {!proto.cashback.ClaimCashbackResponse} msg The message object to deserialize into.
|
|
6578
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
6579
|
+
* @return {!proto.cashback.ClaimCashbackResponse}
|
|
6580
|
+
*/
|
|
6581
|
+
proto.cashback.ClaimCashbackResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
6582
|
+
while (reader.nextField()) {
|
|
6583
|
+
if (reader.isEndGroup()) {
|
|
6584
|
+
break;
|
|
6585
|
+
}
|
|
6586
|
+
var field = reader.getFieldNumber();
|
|
6587
|
+
switch (field) {
|
|
6588
|
+
case 1:
|
|
6589
|
+
var value = /** @type {string} */ (reader.readString());
|
|
6590
|
+
msg.setStatus(value);
|
|
6591
|
+
break;
|
|
6592
|
+
default:
|
|
6593
|
+
reader.skipField();
|
|
6594
|
+
break;
|
|
6595
|
+
}
|
|
6596
|
+
}
|
|
6597
|
+
return msg;
|
|
6598
|
+
};
|
|
6599
|
+
|
|
6600
|
+
|
|
6601
|
+
/**
|
|
6602
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
6603
|
+
* @return {!Uint8Array}
|
|
6604
|
+
*/
|
|
6605
|
+
proto.cashback.ClaimCashbackResponse.prototype.serializeBinary = function() {
|
|
6606
|
+
var writer = new jspb.BinaryWriter();
|
|
6607
|
+
proto.cashback.ClaimCashbackResponse.serializeBinaryToWriter(this, writer);
|
|
6608
|
+
return writer.getResultBuffer();
|
|
6609
|
+
};
|
|
6610
|
+
|
|
6611
|
+
|
|
6612
|
+
/**
|
|
6613
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
6614
|
+
* format), writing to the given BinaryWriter.
|
|
6615
|
+
* @param {!proto.cashback.ClaimCashbackResponse} message
|
|
6616
|
+
* @param {!jspb.BinaryWriter} writer
|
|
6617
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
6618
|
+
*/
|
|
6619
|
+
proto.cashback.ClaimCashbackResponse.serializeBinaryToWriter = function(message, writer) {
|
|
6620
|
+
var f = undefined;
|
|
6621
|
+
f = message.getStatus();
|
|
6622
|
+
if (f.length > 0) {
|
|
6623
|
+
writer.writeString(
|
|
6624
|
+
1,
|
|
6625
|
+
f
|
|
6626
|
+
);
|
|
6627
|
+
}
|
|
6628
|
+
};
|
|
6629
|
+
|
|
6630
|
+
|
|
6631
|
+
/**
|
|
6632
|
+
* optional string status = 1;
|
|
6633
|
+
* @return {string}
|
|
6634
|
+
*/
|
|
6635
|
+
proto.cashback.ClaimCashbackResponse.prototype.getStatus = function() {
|
|
6636
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
6637
|
+
};
|
|
6638
|
+
|
|
6639
|
+
|
|
6640
|
+
/**
|
|
6641
|
+
* @param {string} value
|
|
6642
|
+
* @return {!proto.cashback.ClaimCashbackResponse} returns this
|
|
6643
|
+
*/
|
|
6644
|
+
proto.cashback.ClaimCashbackResponse.prototype.setStatus = function(value) {
|
|
6645
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
6646
|
+
};
|
|
6647
|
+
|
|
6648
|
+
|
|
5860
6649
|
goog.object.extend(exports, proto.cashback);
|