protobuf-platform 1.0.184 → 1.0.186
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
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);
|