protobuf-platform 1.0.54 → 1.0.56
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/game/game.proto +51 -2
- package/game/game_grpc_pb.js +108 -8
- package/game/game_pb.js +2009 -39
- package/package.json +1 -1
package/game/game.proto
CHANGED
@@ -10,7 +10,13 @@ service Game {
|
|
10
10
|
rpc readSingleCategory(GetCategoryRequest) returns (CategoryResponse);
|
11
11
|
rpc updateSingleCategory(stream CategoryRequest) returns (CategoryResponse);
|
12
12
|
rpc deleteSingleCategory(GetCategoryRequest) returns (CategoryStatusResponse);
|
13
|
-
rpc readListCategories(PaginationRequest) returns (
|
13
|
+
rpc readListCategories(PaginationRequest) returns (CategoryItemsResponse);
|
14
|
+
//Collections
|
15
|
+
rpc createSingleCollection(stream CollectionRequest) returns (CollectionResponse);
|
16
|
+
rpc readSingleCollection(GetCollectionRequest) returns (CollectionResponse);
|
17
|
+
rpc updateSingleCollection(stream CollectionRequest) returns (CollectionResponse);
|
18
|
+
rpc deleteSingleCollection(GetCollectionRequest) returns (CategoryStatusResponse);
|
19
|
+
rpc readListCollections(PaginationRequest) returns (CollectionItemsResponse);
|
14
20
|
}
|
15
21
|
|
16
22
|
message PingRequest { string ping = 1; }
|
@@ -51,11 +57,54 @@ message GetCategoryRequest {
|
|
51
57
|
message CategoryResponse {
|
52
58
|
CategoryItem data = 1;
|
53
59
|
}
|
54
|
-
message
|
60
|
+
message CategoryItemsResponse {
|
55
61
|
repeated CategoryItem items = 1;
|
56
62
|
optional int32 total_pages = 2;
|
57
63
|
optional int32 total_items = 3;
|
58
64
|
}
|
59
65
|
message CategoryStatusResponse {
|
60
66
|
string status = 1;
|
67
|
+
}
|
68
|
+
|
69
|
+
//Collection CRUD
|
70
|
+
message CollectionItem {
|
71
|
+
optional int32 id = 1;
|
72
|
+
optional int32 category_id = 2;
|
73
|
+
optional string title = 3;
|
74
|
+
optional string slug = 4;
|
75
|
+
optional string description = 5;
|
76
|
+
optional int32 is_active = 6;
|
77
|
+
optional string image = 7;
|
78
|
+
}
|
79
|
+
//Collection CRUD | Requests
|
80
|
+
message CollectionRequest {
|
81
|
+
oneof request {
|
82
|
+
CollectionItemRequest collection_data = 1;
|
83
|
+
File file = 2;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
message CollectionItemRequest {
|
87
|
+
optional int32 id = 1;
|
88
|
+
optional int32 category_id = 2;
|
89
|
+
optional string title = 3;
|
90
|
+
optional string slug = 4;
|
91
|
+
optional string description = 5;
|
92
|
+
optional int32 is_active = 6;
|
93
|
+
optional string file_name = 7;
|
94
|
+
optional string file_type = 8;
|
95
|
+
}
|
96
|
+
message GetCollectionRequest {
|
97
|
+
int32 id = 1;
|
98
|
+
}
|
99
|
+
//Collection CRUD | Responses
|
100
|
+
message CollectionResponse {
|
101
|
+
CollectionItem data = 1;
|
102
|
+
}
|
103
|
+
message CollectionItemsResponse {
|
104
|
+
repeated CollectionItem items = 1;
|
105
|
+
optional int32 total_pages = 2;
|
106
|
+
optional int32 total_items = 3;
|
107
|
+
}
|
108
|
+
message CollectionStatusResponse {
|
109
|
+
string status = 1;
|
61
110
|
}
|
package/game/game_grpc_pb.js
CHANGED
@@ -4,15 +4,15 @@
|
|
4
4
|
var grpc = require('@grpc/grpc-js');
|
5
5
|
var game_pb = require('./game_pb.js');
|
6
6
|
|
7
|
-
function
|
8
|
-
if (!(arg instanceof game_pb.
|
9
|
-
throw new Error('Expected argument of type game.
|
7
|
+
function serialize_game_CategoryItemsResponse(arg) {
|
8
|
+
if (!(arg instanceof game_pb.CategoryItemsResponse)) {
|
9
|
+
throw new Error('Expected argument of type game.CategoryItemsResponse');
|
10
10
|
}
|
11
11
|
return Buffer.from(arg.serializeBinary());
|
12
12
|
}
|
13
13
|
|
14
|
-
function
|
15
|
-
return game_pb.
|
14
|
+
function deserialize_game_CategoryItemsResponse(buffer_arg) {
|
15
|
+
return game_pb.CategoryItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
16
16
|
}
|
17
17
|
|
18
18
|
function serialize_game_CategoryRequest(arg) {
|
@@ -48,6 +48,39 @@ function deserialize_game_CategoryStatusResponse(buffer_arg) {
|
|
48
48
|
return game_pb.CategoryStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
49
49
|
}
|
50
50
|
|
51
|
+
function serialize_game_CollectionItemsResponse(arg) {
|
52
|
+
if (!(arg instanceof game_pb.CollectionItemsResponse)) {
|
53
|
+
throw new Error('Expected argument of type game.CollectionItemsResponse');
|
54
|
+
}
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
56
|
+
}
|
57
|
+
|
58
|
+
function deserialize_game_CollectionItemsResponse(buffer_arg) {
|
59
|
+
return game_pb.CollectionItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
60
|
+
}
|
61
|
+
|
62
|
+
function serialize_game_CollectionRequest(arg) {
|
63
|
+
if (!(arg instanceof game_pb.CollectionRequest)) {
|
64
|
+
throw new Error('Expected argument of type game.CollectionRequest');
|
65
|
+
}
|
66
|
+
return Buffer.from(arg.serializeBinary());
|
67
|
+
}
|
68
|
+
|
69
|
+
function deserialize_game_CollectionRequest(buffer_arg) {
|
70
|
+
return game_pb.CollectionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
71
|
+
}
|
72
|
+
|
73
|
+
function serialize_game_CollectionResponse(arg) {
|
74
|
+
if (!(arg instanceof game_pb.CollectionResponse)) {
|
75
|
+
throw new Error('Expected argument of type game.CollectionResponse');
|
76
|
+
}
|
77
|
+
return Buffer.from(arg.serializeBinary());
|
78
|
+
}
|
79
|
+
|
80
|
+
function deserialize_game_CollectionResponse(buffer_arg) {
|
81
|
+
return game_pb.CollectionResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
82
|
+
}
|
83
|
+
|
51
84
|
function serialize_game_File(arg) {
|
52
85
|
if (!(arg instanceof game_pb.File)) {
|
53
86
|
throw new Error('Expected argument of type game.File');
|
@@ -70,6 +103,17 @@ function deserialize_game_GetCategoryRequest(buffer_arg) {
|
|
70
103
|
return game_pb.GetCategoryRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
71
104
|
}
|
72
105
|
|
106
|
+
function serialize_game_GetCollectionRequest(arg) {
|
107
|
+
if (!(arg instanceof game_pb.GetCollectionRequest)) {
|
108
|
+
throw new Error('Expected argument of type game.GetCollectionRequest');
|
109
|
+
}
|
110
|
+
return Buffer.from(arg.serializeBinary());
|
111
|
+
}
|
112
|
+
|
113
|
+
function deserialize_game_GetCollectionRequest(buffer_arg) {
|
114
|
+
return game_pb.GetCollectionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
115
|
+
}
|
116
|
+
|
73
117
|
function serialize_game_GetFileRequest(arg) {
|
74
118
|
if (!(arg instanceof game_pb.GetFileRequest)) {
|
75
119
|
throw new Error('Expected argument of type game.GetFileRequest');
|
@@ -188,11 +232,67 @@ createSingleCategory: {
|
|
188
232
|
requestStream: false,
|
189
233
|
responseStream: false,
|
190
234
|
requestType: game_pb.PaginationRequest,
|
191
|
-
responseType: game_pb.
|
235
|
+
responseType: game_pb.CategoryItemsResponse,
|
236
|
+
requestSerialize: serialize_game_PaginationRequest,
|
237
|
+
requestDeserialize: deserialize_game_PaginationRequest,
|
238
|
+
responseSerialize: serialize_game_CategoryItemsResponse,
|
239
|
+
responseDeserialize: deserialize_game_CategoryItemsResponse,
|
240
|
+
},
|
241
|
+
// Collections
|
242
|
+
createSingleCollection: {
|
243
|
+
path: '/game.Game/createSingleCollection',
|
244
|
+
requestStream: true,
|
245
|
+
responseStream: false,
|
246
|
+
requestType: game_pb.CollectionRequest,
|
247
|
+
responseType: game_pb.CollectionResponse,
|
248
|
+
requestSerialize: serialize_game_CollectionRequest,
|
249
|
+
requestDeserialize: deserialize_game_CollectionRequest,
|
250
|
+
responseSerialize: serialize_game_CollectionResponse,
|
251
|
+
responseDeserialize: deserialize_game_CollectionResponse,
|
252
|
+
},
|
253
|
+
readSingleCollection: {
|
254
|
+
path: '/game.Game/readSingleCollection',
|
255
|
+
requestStream: false,
|
256
|
+
responseStream: false,
|
257
|
+
requestType: game_pb.GetCollectionRequest,
|
258
|
+
responseType: game_pb.CollectionResponse,
|
259
|
+
requestSerialize: serialize_game_GetCollectionRequest,
|
260
|
+
requestDeserialize: deserialize_game_GetCollectionRequest,
|
261
|
+
responseSerialize: serialize_game_CollectionResponse,
|
262
|
+
responseDeserialize: deserialize_game_CollectionResponse,
|
263
|
+
},
|
264
|
+
updateSingleCollection: {
|
265
|
+
path: '/game.Game/updateSingleCollection',
|
266
|
+
requestStream: true,
|
267
|
+
responseStream: false,
|
268
|
+
requestType: game_pb.CollectionRequest,
|
269
|
+
responseType: game_pb.CollectionResponse,
|
270
|
+
requestSerialize: serialize_game_CollectionRequest,
|
271
|
+
requestDeserialize: deserialize_game_CollectionRequest,
|
272
|
+
responseSerialize: serialize_game_CollectionResponse,
|
273
|
+
responseDeserialize: deserialize_game_CollectionResponse,
|
274
|
+
},
|
275
|
+
deleteSingleCollection: {
|
276
|
+
path: '/game.Game/deleteSingleCollection',
|
277
|
+
requestStream: false,
|
278
|
+
responseStream: false,
|
279
|
+
requestType: game_pb.GetCollectionRequest,
|
280
|
+
responseType: game_pb.CategoryStatusResponse,
|
281
|
+
requestSerialize: serialize_game_GetCollectionRequest,
|
282
|
+
requestDeserialize: deserialize_game_GetCollectionRequest,
|
283
|
+
responseSerialize: serialize_game_CategoryStatusResponse,
|
284
|
+
responseDeserialize: deserialize_game_CategoryStatusResponse,
|
285
|
+
},
|
286
|
+
readListCollections: {
|
287
|
+
path: '/game.Game/readListCollections',
|
288
|
+
requestStream: false,
|
289
|
+
responseStream: false,
|
290
|
+
requestType: game_pb.PaginationRequest,
|
291
|
+
responseType: game_pb.CollectionItemsResponse,
|
192
292
|
requestSerialize: serialize_game_PaginationRequest,
|
193
293
|
requestDeserialize: deserialize_game_PaginationRequest,
|
194
|
-
responseSerialize:
|
195
|
-
responseDeserialize:
|
294
|
+
responseSerialize: serialize_game_CollectionItemsResponse,
|
295
|
+
responseDeserialize: deserialize_game_CollectionItemsResponse,
|
196
296
|
},
|
197
297
|
};
|
198
298
|
|