protobuf-platform 1.0.234 → 1.0.236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cashback/cashback.proto +15 -0
- package/cashback/cashback_grpc_pb.js +44 -0
- package/cashback/cashback_pb.js +827 -0
- package/index.js +18 -0
- package/package.json +1 -1
- package/promocode/promocode.proto +55 -0
- package/promocode/promocode_grpc_pb.js +166 -0
- package/promocode/promocode_pb.js +2546 -0
- package/tournament/tournament.proto +15 -0
- package/tournament/tournament_grpc_pb.js +44 -0
- package/tournament/tournament_pb.js +827 -0
- package/update_protobuf.sh +4 -1
package/index.js
CHANGED
@@ -23,6 +23,12 @@ const NotificationService = require('./notification/notification_grpc_pb');
|
|
23
23
|
const NotificationServiceMessages = require('./notification/notification_pb');
|
24
24
|
const PaymentService = require('./payment/payment_grpc_pb');
|
25
25
|
const PaymentServiceMessages = require('./payment/payment_pb');
|
26
|
+
const CashBackService = require('./cashback/cashback_grpc_pb');
|
27
|
+
const CashBackServiceMessages = require('./cashback/cashback_pb');
|
28
|
+
const PromoCodeService = require('./promocode/promocode_grpc_pb');
|
29
|
+
const PromoCodeServiceMessages = require('./promocode/promocode_pb');
|
30
|
+
const TournamentService = require('./tournament/tournament_grpc_pb');
|
31
|
+
const TournamentServiceMessages = require('./tournament/tournament_pb');
|
26
32
|
module.exports = {
|
27
33
|
gRPC: gRPC,
|
28
34
|
maxSendMessageLength: 10388608,
|
@@ -72,4 +78,16 @@ module.exports = {
|
|
72
78
|
service: PaymentService,
|
73
79
|
messages: PaymentServiceMessages
|
74
80
|
},
|
81
|
+
cashback: {
|
82
|
+
service: CashBackService,
|
83
|
+
messages: CashBackServiceMessages
|
84
|
+
},
|
85
|
+
promocode: {
|
86
|
+
service: PromoCodeService,
|
87
|
+
messages: PromoCodeServiceMessages
|
88
|
+
},
|
89
|
+
tournament: {
|
90
|
+
service: TournamentService,
|
91
|
+
messages: TournamentServiceMessages
|
92
|
+
},
|
75
93
|
};
|
package/package.json
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package promocode;
|
4
|
+
|
5
|
+
service Promocode {
|
6
|
+
rpc checkConnection(PingRequest) returns (PongResponse);
|
7
|
+
//Main
|
8
|
+
rpc createSingleCode(CodeRequest) returns (CodeResponse);
|
9
|
+
rpc readSingleCode(GetCodeRequest) returns (CodeResponse);
|
10
|
+
rpc updateSingleCode(CodeRequest) returns (CodeResponse);
|
11
|
+
rpc deleteSingleCode(GetCodeRequest) returns (CodeStatusResponse);
|
12
|
+
rpc readListCodes(PaginationRequest) returns (CodeItemsResponse);
|
13
|
+
}
|
14
|
+
message PingRequest { string ping = 1; }
|
15
|
+
message PongResponse { string pong = 1; }
|
16
|
+
message PaginationRequest { int32 limit = 1; int32 offset = 2; optional UserSearchRequest user_search_params = 3; }
|
17
|
+
message UserSearchRequest {
|
18
|
+
optional int32 user_id = 1;
|
19
|
+
optional string balance_type = 2;
|
20
|
+
optional string currency = 3;
|
21
|
+
}
|
22
|
+
//Main CRUD
|
23
|
+
message GetCodeRequest {
|
24
|
+
int32 id = 1;
|
25
|
+
}
|
26
|
+
message CodeRequest {
|
27
|
+
optional int32 id = 1;
|
28
|
+
optional string title = 2;
|
29
|
+
optional string code = 3;
|
30
|
+
optional string description = 4;
|
31
|
+
optional int32 max_used_count = 5;
|
32
|
+
optional int32 is_active = 6;
|
33
|
+
optional string type = 7;
|
34
|
+
}
|
35
|
+
message CodeItem {
|
36
|
+
optional int32 id = 1;
|
37
|
+
optional string title = 2;
|
38
|
+
optional string code = 3;
|
39
|
+
optional string description = 4;
|
40
|
+
optional int32 max_used_count = 5;
|
41
|
+
optional int32 current_used_count = 6;
|
42
|
+
optional int32 is_active = 7;
|
43
|
+
optional string type = 8;
|
44
|
+
}
|
45
|
+
message CodeResponse {
|
46
|
+
CodeItem data = 1;
|
47
|
+
}
|
48
|
+
message CodeItemsResponse {
|
49
|
+
repeated CodeItem items = 1;
|
50
|
+
optional int32 total_pages = 2;
|
51
|
+
optional int32 total_items = 3;
|
52
|
+
}
|
53
|
+
message CodeStatusResponse {
|
54
|
+
string status = 1;
|
55
|
+
}
|
@@ -0,0 +1,166 @@
|
|
1
|
+
// GENERATED CODE -- DO NOT EDIT!
|
2
|
+
|
3
|
+
'use strict';
|
4
|
+
var grpc = require('@grpc/grpc-js');
|
5
|
+
var promocode_pb = require('./promocode_pb.js');
|
6
|
+
|
7
|
+
function serialize_promocode_CodeItemsResponse(arg) {
|
8
|
+
if (!(arg instanceof promocode_pb.CodeItemsResponse)) {
|
9
|
+
throw new Error('Expected argument of type promocode.CodeItemsResponse');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_promocode_CodeItemsResponse(buffer_arg) {
|
15
|
+
return promocode_pb.CodeItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
18
|
+
function serialize_promocode_CodeRequest(arg) {
|
19
|
+
if (!(arg instanceof promocode_pb.CodeRequest)) {
|
20
|
+
throw new Error('Expected argument of type promocode.CodeRequest');
|
21
|
+
}
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
23
|
+
}
|
24
|
+
|
25
|
+
function deserialize_promocode_CodeRequest(buffer_arg) {
|
26
|
+
return promocode_pb.CodeRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
27
|
+
}
|
28
|
+
|
29
|
+
function serialize_promocode_CodeResponse(arg) {
|
30
|
+
if (!(arg instanceof promocode_pb.CodeResponse)) {
|
31
|
+
throw new Error('Expected argument of type promocode.CodeResponse');
|
32
|
+
}
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
34
|
+
}
|
35
|
+
|
36
|
+
function deserialize_promocode_CodeResponse(buffer_arg) {
|
37
|
+
return promocode_pb.CodeResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
38
|
+
}
|
39
|
+
|
40
|
+
function serialize_promocode_CodeStatusResponse(arg) {
|
41
|
+
if (!(arg instanceof promocode_pb.CodeStatusResponse)) {
|
42
|
+
throw new Error('Expected argument of type promocode.CodeStatusResponse');
|
43
|
+
}
|
44
|
+
return Buffer.from(arg.serializeBinary());
|
45
|
+
}
|
46
|
+
|
47
|
+
function deserialize_promocode_CodeStatusResponse(buffer_arg) {
|
48
|
+
return promocode_pb.CodeStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
49
|
+
}
|
50
|
+
|
51
|
+
function serialize_promocode_GetCodeRequest(arg) {
|
52
|
+
if (!(arg instanceof promocode_pb.GetCodeRequest)) {
|
53
|
+
throw new Error('Expected argument of type promocode.GetCodeRequest');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_promocode_GetCodeRequest(buffer_arg) {
|
59
|
+
return promocode_pb.GetCodeRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
62
|
+
function serialize_promocode_PaginationRequest(arg) {
|
63
|
+
if (!(arg instanceof promocode_pb.PaginationRequest)) {
|
64
|
+
throw new Error('Expected argument of type promocode.PaginationRequest');
|
65
|
+
}
|
66
|
+
return Buffer.from(arg.serializeBinary());
|
67
|
+
}
|
68
|
+
|
69
|
+
function deserialize_promocode_PaginationRequest(buffer_arg) {
|
70
|
+
return promocode_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
71
|
+
}
|
72
|
+
|
73
|
+
function serialize_promocode_PingRequest(arg) {
|
74
|
+
if (!(arg instanceof promocode_pb.PingRequest)) {
|
75
|
+
throw new Error('Expected argument of type promocode.PingRequest');
|
76
|
+
}
|
77
|
+
return Buffer.from(arg.serializeBinary());
|
78
|
+
}
|
79
|
+
|
80
|
+
function deserialize_promocode_PingRequest(buffer_arg) {
|
81
|
+
return promocode_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
82
|
+
}
|
83
|
+
|
84
|
+
function serialize_promocode_PongResponse(arg) {
|
85
|
+
if (!(arg instanceof promocode_pb.PongResponse)) {
|
86
|
+
throw new Error('Expected argument of type promocode.PongResponse');
|
87
|
+
}
|
88
|
+
return Buffer.from(arg.serializeBinary());
|
89
|
+
}
|
90
|
+
|
91
|
+
function deserialize_promocode_PongResponse(buffer_arg) {
|
92
|
+
return promocode_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
93
|
+
}
|
94
|
+
|
95
|
+
|
96
|
+
var PromocodeService = exports.PromocodeService = {
|
97
|
+
checkConnection: {
|
98
|
+
path: '/promocode.Promocode/checkConnection',
|
99
|
+
requestStream: false,
|
100
|
+
responseStream: false,
|
101
|
+
requestType: promocode_pb.PingRequest,
|
102
|
+
responseType: promocode_pb.PongResponse,
|
103
|
+
requestSerialize: serialize_promocode_PingRequest,
|
104
|
+
requestDeserialize: deserialize_promocode_PingRequest,
|
105
|
+
responseSerialize: serialize_promocode_PongResponse,
|
106
|
+
responseDeserialize: deserialize_promocode_PongResponse,
|
107
|
+
},
|
108
|
+
// Main
|
109
|
+
createSingleCode: {
|
110
|
+
path: '/promocode.Promocode/createSingleCode',
|
111
|
+
requestStream: false,
|
112
|
+
responseStream: false,
|
113
|
+
requestType: promocode_pb.CodeRequest,
|
114
|
+
responseType: promocode_pb.CodeResponse,
|
115
|
+
requestSerialize: serialize_promocode_CodeRequest,
|
116
|
+
requestDeserialize: deserialize_promocode_CodeRequest,
|
117
|
+
responseSerialize: serialize_promocode_CodeResponse,
|
118
|
+
responseDeserialize: deserialize_promocode_CodeResponse,
|
119
|
+
},
|
120
|
+
readSingleCode: {
|
121
|
+
path: '/promocode.Promocode/readSingleCode',
|
122
|
+
requestStream: false,
|
123
|
+
responseStream: false,
|
124
|
+
requestType: promocode_pb.GetCodeRequest,
|
125
|
+
responseType: promocode_pb.CodeResponse,
|
126
|
+
requestSerialize: serialize_promocode_GetCodeRequest,
|
127
|
+
requestDeserialize: deserialize_promocode_GetCodeRequest,
|
128
|
+
responseSerialize: serialize_promocode_CodeResponse,
|
129
|
+
responseDeserialize: deserialize_promocode_CodeResponse,
|
130
|
+
},
|
131
|
+
updateSingleCode: {
|
132
|
+
path: '/promocode.Promocode/updateSingleCode',
|
133
|
+
requestStream: false,
|
134
|
+
responseStream: false,
|
135
|
+
requestType: promocode_pb.CodeRequest,
|
136
|
+
responseType: promocode_pb.CodeResponse,
|
137
|
+
requestSerialize: serialize_promocode_CodeRequest,
|
138
|
+
requestDeserialize: deserialize_promocode_CodeRequest,
|
139
|
+
responseSerialize: serialize_promocode_CodeResponse,
|
140
|
+
responseDeserialize: deserialize_promocode_CodeResponse,
|
141
|
+
},
|
142
|
+
deleteSingleCode: {
|
143
|
+
path: '/promocode.Promocode/deleteSingleCode',
|
144
|
+
requestStream: false,
|
145
|
+
responseStream: false,
|
146
|
+
requestType: promocode_pb.GetCodeRequest,
|
147
|
+
responseType: promocode_pb.CodeStatusResponse,
|
148
|
+
requestSerialize: serialize_promocode_GetCodeRequest,
|
149
|
+
requestDeserialize: deserialize_promocode_GetCodeRequest,
|
150
|
+
responseSerialize: serialize_promocode_CodeStatusResponse,
|
151
|
+
responseDeserialize: deserialize_promocode_CodeStatusResponse,
|
152
|
+
},
|
153
|
+
readListCodes: {
|
154
|
+
path: '/promocode.Promocode/readListCodes',
|
155
|
+
requestStream: false,
|
156
|
+
responseStream: false,
|
157
|
+
requestType: promocode_pb.PaginationRequest,
|
158
|
+
responseType: promocode_pb.CodeItemsResponse,
|
159
|
+
requestSerialize: serialize_promocode_PaginationRequest,
|
160
|
+
requestDeserialize: deserialize_promocode_PaginationRequest,
|
161
|
+
responseSerialize: serialize_promocode_CodeItemsResponse,
|
162
|
+
responseDeserialize: deserialize_promocode_CodeItemsResponse,
|
163
|
+
},
|
164
|
+
};
|
165
|
+
|
166
|
+
exports.PromocodeClient = grpc.makeGenericClientConstructor(PromocodeService);
|