protobuf-platform 1.2.1 → 1.2.3
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/cms/cms.proto +51 -0
- package/cms/cms_grpc_pb.js +111 -0
- package/cms/cms_pb.js +2214 -0
- package/package.json +1 -1
- package/user/user.proto +1 -0
- package/user/user_pb.js +49 -1
package/cms/cms.proto
CHANGED
@@ -32,6 +32,12 @@ service CMS {
|
|
32
32
|
rpc updateSinglePage(PageRequest) returns (PageResponse);
|
33
33
|
rpc deleteSinglePage(GetPageRequest) returns (PageStatusResponse);
|
34
34
|
rpc readListPages(PaginationRequest) returns (PagesItemsResponse);
|
35
|
+
//Pages
|
36
|
+
rpc createSinglePromo(PromoRequest) returns (PromoResponse);
|
37
|
+
rpc readSinglePromo(GetPromoRequest) returns (PromoResponse);
|
38
|
+
rpc updateSinglePromo(PromoRequest) returns (PromoResponse);
|
39
|
+
rpc deleteSinglePromo(GetPromoRequest) returns (PromoStatusResponse);
|
40
|
+
rpc readListPromos(PaginationRequest) returns (PromosItemsResponse);
|
35
41
|
}
|
36
42
|
|
37
43
|
message PingRequest { string ping = 1; }
|
@@ -201,4 +207,49 @@ message GetPageRequest {
|
|
201
207
|
}
|
202
208
|
message PageStatusResponse {
|
203
209
|
string status = 1;
|
210
|
+
}
|
211
|
+
//Promo CRUD
|
212
|
+
message PromoRequest {
|
213
|
+
oneof request {
|
214
|
+
PromoItemRequest banner_data = 1;
|
215
|
+
File image_big = 2;
|
216
|
+
File image_small = 3;
|
217
|
+
}
|
218
|
+
}
|
219
|
+
message PromoItemRequest {
|
220
|
+
optional int32 id = 1;
|
221
|
+
optional string slug = 2;
|
222
|
+
optional string title = 3;
|
223
|
+
optional string geo = 4;
|
224
|
+
optional string anchor = 5;
|
225
|
+
optional int32 is_active = 6;
|
226
|
+
optional string started_at = 7;
|
227
|
+
optional string finished_at = 8;
|
228
|
+
}
|
229
|
+
message PromoItem {
|
230
|
+
optional int32 id = 1;
|
231
|
+
optional string slug = 2;
|
232
|
+
optional string title = 3;
|
233
|
+
optional string geo = 4;
|
234
|
+
optional string anchor = 5;
|
235
|
+
optional int32 is_active = 6;
|
236
|
+
optional string started_at = 7;
|
237
|
+
optional string finished_at = 8;
|
238
|
+
optional string image_big = 9;
|
239
|
+
optional string image_small = 10;
|
240
|
+
}
|
241
|
+
message PromoResponse {
|
242
|
+
PromoItem data = 1;
|
243
|
+
}
|
244
|
+
message GetPromoRequest {
|
245
|
+
int32 id = 1;
|
246
|
+
optional bool admin_side = 4;
|
247
|
+
}
|
248
|
+
message PromoStatusResponse {
|
249
|
+
string status = 1;
|
250
|
+
}
|
251
|
+
message PromosItemsResponse {
|
252
|
+
repeated PromoItem items = 1;
|
253
|
+
optional int32 total_pages = 2;
|
254
|
+
optional int32 total_items = 3;
|
204
255
|
}
|
package/cms/cms_grpc_pb.js
CHANGED
@@ -180,6 +180,17 @@ function deserialize_cms_GetPageRequest(buffer_arg) {
|
|
180
180
|
return cms_pb.GetPageRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
181
181
|
}
|
182
182
|
|
183
|
+
function serialize_cms_GetPromoRequest(arg) {
|
184
|
+
if (!(arg instanceof cms_pb.GetPromoRequest)) {
|
185
|
+
throw new Error('Expected argument of type cms.GetPromoRequest');
|
186
|
+
}
|
187
|
+
return Buffer.from(arg.serializeBinary());
|
188
|
+
}
|
189
|
+
|
190
|
+
function deserialize_cms_GetPromoRequest(buffer_arg) {
|
191
|
+
return cms_pb.GetPromoRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
192
|
+
}
|
193
|
+
|
183
194
|
function serialize_cms_GetSignUpFormWidgetRequest(arg) {
|
184
195
|
if (!(arg instanceof cms_pb.GetSignUpFormWidgetRequest)) {
|
185
196
|
throw new Error('Expected argument of type cms.GetSignUpFormWidgetRequest');
|
@@ -290,6 +301,50 @@ function deserialize_cms_PongResponse(buffer_arg) {
|
|
290
301
|
return cms_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
291
302
|
}
|
292
303
|
|
304
|
+
function serialize_cms_PromoRequest(arg) {
|
305
|
+
if (!(arg instanceof cms_pb.PromoRequest)) {
|
306
|
+
throw new Error('Expected argument of type cms.PromoRequest');
|
307
|
+
}
|
308
|
+
return Buffer.from(arg.serializeBinary());
|
309
|
+
}
|
310
|
+
|
311
|
+
function deserialize_cms_PromoRequest(buffer_arg) {
|
312
|
+
return cms_pb.PromoRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
313
|
+
}
|
314
|
+
|
315
|
+
function serialize_cms_PromoResponse(arg) {
|
316
|
+
if (!(arg instanceof cms_pb.PromoResponse)) {
|
317
|
+
throw new Error('Expected argument of type cms.PromoResponse');
|
318
|
+
}
|
319
|
+
return Buffer.from(arg.serializeBinary());
|
320
|
+
}
|
321
|
+
|
322
|
+
function deserialize_cms_PromoResponse(buffer_arg) {
|
323
|
+
return cms_pb.PromoResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
324
|
+
}
|
325
|
+
|
326
|
+
function serialize_cms_PromoStatusResponse(arg) {
|
327
|
+
if (!(arg instanceof cms_pb.PromoStatusResponse)) {
|
328
|
+
throw new Error('Expected argument of type cms.PromoStatusResponse');
|
329
|
+
}
|
330
|
+
return Buffer.from(arg.serializeBinary());
|
331
|
+
}
|
332
|
+
|
333
|
+
function deserialize_cms_PromoStatusResponse(buffer_arg) {
|
334
|
+
return cms_pb.PromoStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
335
|
+
}
|
336
|
+
|
337
|
+
function serialize_cms_PromosItemsResponse(arg) {
|
338
|
+
if (!(arg instanceof cms_pb.PromosItemsResponse)) {
|
339
|
+
throw new Error('Expected argument of type cms.PromosItemsResponse');
|
340
|
+
}
|
341
|
+
return Buffer.from(arg.serializeBinary());
|
342
|
+
}
|
343
|
+
|
344
|
+
function deserialize_cms_PromosItemsResponse(buffer_arg) {
|
345
|
+
return cms_pb.PromosItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
346
|
+
}
|
347
|
+
|
293
348
|
function serialize_cms_SignUpFormWidgetItem(arg) {
|
294
349
|
if (!(arg instanceof cms_pb.SignUpFormWidgetItem)) {
|
295
350
|
throw new Error('Expected argument of type cms.SignUpFormWidgetItem');
|
@@ -593,6 +648,62 @@ createSinglePage: {
|
|
593
648
|
responseSerialize: serialize_cms_PagesItemsResponse,
|
594
649
|
responseDeserialize: deserialize_cms_PagesItemsResponse,
|
595
650
|
},
|
651
|
+
// Pages
|
652
|
+
createSinglePromo: {
|
653
|
+
path: '/cms.CMS/createSinglePromo',
|
654
|
+
requestStream: false,
|
655
|
+
responseStream: false,
|
656
|
+
requestType: cms_pb.PromoRequest,
|
657
|
+
responseType: cms_pb.PromoResponse,
|
658
|
+
requestSerialize: serialize_cms_PromoRequest,
|
659
|
+
requestDeserialize: deserialize_cms_PromoRequest,
|
660
|
+
responseSerialize: serialize_cms_PromoResponse,
|
661
|
+
responseDeserialize: deserialize_cms_PromoResponse,
|
662
|
+
},
|
663
|
+
readSinglePromo: {
|
664
|
+
path: '/cms.CMS/readSinglePromo',
|
665
|
+
requestStream: false,
|
666
|
+
responseStream: false,
|
667
|
+
requestType: cms_pb.GetPromoRequest,
|
668
|
+
responseType: cms_pb.PromoResponse,
|
669
|
+
requestSerialize: serialize_cms_GetPromoRequest,
|
670
|
+
requestDeserialize: deserialize_cms_GetPromoRequest,
|
671
|
+
responseSerialize: serialize_cms_PromoResponse,
|
672
|
+
responseDeserialize: deserialize_cms_PromoResponse,
|
673
|
+
},
|
674
|
+
updateSinglePromo: {
|
675
|
+
path: '/cms.CMS/updateSinglePromo',
|
676
|
+
requestStream: false,
|
677
|
+
responseStream: false,
|
678
|
+
requestType: cms_pb.PromoRequest,
|
679
|
+
responseType: cms_pb.PromoResponse,
|
680
|
+
requestSerialize: serialize_cms_PromoRequest,
|
681
|
+
requestDeserialize: deserialize_cms_PromoRequest,
|
682
|
+
responseSerialize: serialize_cms_PromoResponse,
|
683
|
+
responseDeserialize: deserialize_cms_PromoResponse,
|
684
|
+
},
|
685
|
+
deleteSinglePromo: {
|
686
|
+
path: '/cms.CMS/deleteSinglePromo',
|
687
|
+
requestStream: false,
|
688
|
+
responseStream: false,
|
689
|
+
requestType: cms_pb.GetPromoRequest,
|
690
|
+
responseType: cms_pb.PromoStatusResponse,
|
691
|
+
requestSerialize: serialize_cms_GetPromoRequest,
|
692
|
+
requestDeserialize: deserialize_cms_GetPromoRequest,
|
693
|
+
responseSerialize: serialize_cms_PromoStatusResponse,
|
694
|
+
responseDeserialize: deserialize_cms_PromoStatusResponse,
|
695
|
+
},
|
696
|
+
readListPromos: {
|
697
|
+
path: '/cms.CMS/readListPromos',
|
698
|
+
requestStream: false,
|
699
|
+
responseStream: false,
|
700
|
+
requestType: cms_pb.PaginationRequest,
|
701
|
+
responseType: cms_pb.PromosItemsResponse,
|
702
|
+
requestSerialize: serialize_cms_PaginationRequest,
|
703
|
+
requestDeserialize: deserialize_cms_PaginationRequest,
|
704
|
+
responseSerialize: serialize_cms_PromosItemsResponse,
|
705
|
+
responseDeserialize: deserialize_cms_PromosItemsResponse,
|
706
|
+
},
|
596
707
|
};
|
597
708
|
|
598
709
|
exports.CMSClient = grpc.makeGenericClientConstructor(CMSService);
|